17 references to ToLookup
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\AzureProvisioner.cs (1)
110_parentChildLookup = appModel.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
479var documentLookup = referenceLocations.ToLookup(refLoc => refLoc.Document);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
479var documentLookup = referenceLocations.ToLookup(refLoc => refLoc.Document);
Microsoft.CodeAnalysis.EditorFeatures (1)
InlineRename\InlineRenameSession.cs (1)
428var locationsByDocument = locations.ToLookup(l => l.Document.Id);
Microsoft.CodeAnalysis.Features (2)
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
173var getReferencesByDocument = getMethodReferences.SelectMany(r => r.Locations).ToLookup(loc => loc.Document);
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
100var referencesByDocument = q.ToLookup(t => t.location.Document);
Microsoft.CodeAnalysis.UnitTests (4)
Collections\List\CollectionAsserts.cs (4)
81ILookup<object?, object?> e = expected.Cast<object?>().ToLookup(key => key); 82ILookup<object?, object?> a = actual!.Cast<object?>().ToLookup(key => key); 100ILookup<object?, object?> e = expected.Cast<object?>().ToLookup(key => key); 101ILookup<object?, object?> a = actual!.Cast<object?>().ToLookup(key => key);
Microsoft.CodeAnalysis.Workspaces (2)
Editing\SymbolEditor.cs (1)
463var declsByDocId = this.GetDeclarations(currentSymbol).ToLookup(d => ChangedSolution.GetDocument(d.SyntaxTree).Id);
Workspace\Solution\SolutionCompilationState.cs (1)
1668var documentIdsByProjectId = documentIds.ToLookup(id => id.ProjectId);
Microsoft.DotNet.SharedFramework.Sdk (1)
src\GeneratePlatformManifestEntriesFromTemplate.cs (1)
32var files = Files.ToLookup(file => Path.GetFileName(file.ItemSpec)).ToDictionary(l => l.Key, l=> l.First());
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Modeler\ServiceClientModelFactory.cs (1)
126.ToLookup(t => t.operation.Tags.FirstOrDefault()?.Name)
Microsoft.Gen.ContextualOptions (2)
ContextReceiver.cs (1)
46.ToLookup(declaration => declaration.SyntaxTree)
ContextualOptionsGenerator.cs (1)
38.ToLookup(declaration => declaration.SyntaxTree)
System.Linq.Queryable (1)
System\Linq\EnumerableRewriter.cs (1)
220s_seqMethods ??= GetEnumerableStaticMethods(typeof(Enumerable)).ToLookup(m => m.Name);