5 implementations of ILookup
System.Linq (2)
System\Linq\Lookup.cs (2)
76public partial class Lookup<TKey, TElement> : ILookup<TKey, TElement> 320internal sealed class EmptyLookup<TKey, TElement> : ILookup<TKey, TElement>, ICollection<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>>
System.Linq.AsyncEnumerable (2)
System\Linq\ToLookupAsync.cs (2)
220private sealed class EmptyLookup<TKey, TElement> : ILookup<TKey, TElement>, IList<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>> 267private sealed class AsyncLookup<TKey, TElement> : ILookup<TKey, TElement>
System.Linq.Parallel (1)
System\Linq\Parallel\Utils\Lookup.cs (1)
37internal sealed class Lookup<TKey, TElement> : ILookup<TKey, TElement> where TKey : notnull
119 references to ILookup
Aspire.Dashboard (26)
Otlp\Storage\SqliteTelemetryRepository.Caching.cs (1)
544var scopeAttributes = reader.Read<CachedScopeAttributeRecord>().ToLookup(record => record.ScopeId);
Otlp\Storage\SqliteTelemetryRepository.Logs.cs (1)
692var logAttributes = attributeRecords.ToLookup(record => record.OwnerId);
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (8)
226var points = pointRecords.ToLookup(record => record.DimensionId); 227var exemplars = includeExemplars 280var pointAttributes = dimensionRecords 295var attributes = dimensionIds 366ILookup<long, OwnedAttributeRecord> attributes, 407private static ILookup<long, MetricsExemplar> MaterializeMetricExemplars( 449var attributes = populateExemplarAttributes 468private static ILookup<long, OwnedAttributeRecord> MaterializeMetricExemplarAttributes(
Otlp\Storage\SqliteTelemetryRepository.Traces.Reads.cs (6)
728var spanAttributes = connection.Query<TraceOwnedAttributeRecord>(""" 750var eventAttributes = eventAttributeRecords.ToLookup(record => record.OwnerId); 751var events = eventRecords.ToLookup(record => (record.TraceId, record.SpanId)); 774var linkAttributes = linkAttributeRecords.ToLookup(record => record.OwnerId); 775var outgoingLinks = linkRecords.ToLookup(record => (record.SourceTraceId, record.SourceSpanId)); 776var incomingLinks = linkRecords.ToLookup(record => (record.TraceId, record.SpanId));
ServiceClient\SqliteResourceRepository.Storage.cs (10)
427var environments = reader.Read<EnvironmentRecord>().ToLookup(record => record.ResourceName, StringComparers.ResourceName); 428var urls = reader.Read<UrlRecord>().ToLookup(record => record.ResourceName, StringComparers.ResourceName); 429var volumes = reader.Read<VolumeRecord>().ToLookup(record => record.ResourceName, StringComparers.ResourceName); 430var healthReports = reader.Read<HealthReportRecord>().ToLookup(record => record.ResourceName, StringComparers.ResourceName); 431var relationships = reader.Read<RelationshipRecord>().ToLookup(record => record.ResourceName, StringComparers.ResourceName); 432var properties = reader.Read<PropertyRecord>().ToLookup(record => record.ResourceName, StringComparers.ResourceName); 433var commands = reader.Read<CommandRecord>().ToLookup(record => record.ResourceName, StringComparers.ResourceName); 434var inputs = reader.Read<InputRecord>().ToLookup(record => (record.ResourceName, record.CommandOrdinal)); 435var options = reader.Read<OptionRecord>().ToLookup(record => (record.ResourceName, record.CommandOrdinal, record.InputOrdinal)); 436var validationErrors = reader.Read<ValidationErrorRecord>().ToLookup(record => (record.ResourceName, record.CommandOrdinal, record.InputOrdinal));
Aspire.Hosting (4)
Devcontainers\DevcontainerSettingsWriter.cs (1)
145var portsByLabel = (from props in portsAttributes
Orchestrator\ApplicationOrchestrator.cs (1)
25private readonly ILookup<IResource, IResource> _parentChildLookup;
Orchestrator\RelationshipEvaluator.cs (1)
13public static ILookup<IResource, IResource> GetParentChildLookup(DistributedApplicationModel model)
Pipelines\PipelineConfigurationContext.cs (1)
49internal ILookup<IResource?, PipelineStep>? StepToResourceMap { get; init; }
Aspire.Hosting.Azure (17)
AzureProvisioningController.cs (16)
1039var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 1151var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 1246var parentChildLookup = GetTargetParentChildLookup(model, includeAnnotationParentRelationships); 1303private static ILookup<IResource, IResource> GetTargetParentChildLookup(DistributedApplicationModel model, bool includeAnnotationParentRelationships) 1903var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 2026var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 2092var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 2177var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 3675ILookup<IResource, IResourceWithParent> parentChildLookup, 3715ILookup<IResource, IResourceWithParent> parentChildLookup) 3773var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 3786ILookup<IResource, IResourceWithParent> parentChildLookup) 3855ILookup<IResource, IResourceWithParent> parentChildLookup) 3885ILookup<IResource, IResourceWithParent> parentChildLookup, 3908ILookup<IResource, IResourceWithParent> parentChildLookup, 4097ILookup<IResource, IResourceWithParent> parentChildLookup,
AzureResourcePreparer.cs (1)
227var azureReferencesWithRoleAssignments =
Aspire.Hosting.Dotnet (2)
DotnetProjectResource.cs (2)
158var stepsByName = steps.ToLookup(step => step.Name, StringComparer.Ordinal); 159var requiredStepsByName = steps
Aspire.Hosting.Tests (5)
Orchestrator\RelationshipEvaluatorTests.cs (5)
31var parentChildLookup = RelationshipEvaluator.GetParentChildLookup(appModel); 63var parentChildLookup = RelationshipEvaluator.GetParentChildLookup(appModel); 86var parentChildLookup = RelationshipEvaluator.GetParentChildLookup(appModel); 109var parentChildLookup = RelationshipEvaluator.GetParentChildLookup(appModel); 132var parentChildLookup = RelationshipEvaluator.GetParentChildLookup(appModel);
CSharpSyntaxGenerator (2)
AbstractFileWriter.cs (2)
20private readonly ILookup<string, string> _childMap; 43protected ILookup<string, string> ChildMap { get { return _childMap; } }
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
ViewComponents\DefaultViewComponentSelector.cs (3)
52private readonly ILookup<string, ViewComponentDescriptor> _lookupByShortName; 53private readonly ILookup<string, ViewComponentDescriptor> _lookupByFullName; 76ILookup<string, ViewComponentDescriptor> candidates,
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityMapAbstractDomain.cs (1)
86var map2LookupIgnoringInstanceLocation = map2.Keys.Where(IsAnalysisEntityForFieldOrProperty)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
100var locationsByDocument = locationsInSource.ToLookup(
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
483var documentLookup = referenceLocations.ToLookup(refLoc => refLoc.Document);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
483var documentLookup = referenceLocations.ToLookup(refLoc => refLoc.Document);
Microsoft.CodeAnalysis.Features (11)
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (4)
122var projectToLocations = memberReferenceLocations.ToLookup(loc => loc.location.Document.Project.Id); 205var projectToLocations = memberReferenceLocations.ToLookup(loc => loc.location.Document.Project.Id); 237ILookup<ProjectId, (ReferenceLocation location, bool isExtensionMethod)> projectToLocations, 250var documentToLocations = referencesForProject.ToLookup(reference => reference.location.Document.Id);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (4)
173var getReferencesByDocument = getMethodReferences.SelectMany(r => r.Locations).ToLookup(loc => loc.Document); 174var setReferencesByDocument = setMethodReferences.SelectMany(r => r.Locations).ToLookup(loc => loc.Document); 188private static async Task<Solution> UpdateReferencesAsync(Solution updatedSolution, string propertyName, bool nameChanged, ILookup<Document, ReferenceLocation> getReferencesByDocument, ILookup<Document, ReferenceLocation> setReferencesByDocument, CancellationToken cancellationToken)
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (2)
96var referencesByDocument = q.ToLookup(t => t.location.Document); 193ILookup<Document, (IPropertySymbol property, ReferenceLocation location)> referencesByDocument,
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
100var locationsByDocument = locationsInSource.ToLookup(
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\9382845807600969\AnalysisEntityMapAbstractDomain.cs (1)
85var map2LookupIgnoringInstanceLocation = map2.Keys.Where(IsAnalysisEntityForFieldOrProperty)
Microsoft.CodeAnalysis.Workspaces (2)
Editing\SymbolEditor.cs (1)
458var declsByDocId = this.GetDeclarations(currentSymbol).ToLookup(d => ChangedSolution.GetDocument(d.SyntaxTree).Id);
Workspace\Solution\SolutionCompilationState.cs (1)
1811var documentIdsByProjectId = documentIds.ToLookup(id => id.ProjectId);
Microsoft.DotNet.ApiCompatibility (1)
ApiComparer.cs (1)
129private static List<CompatDifference> SortCompatDifferencesByInputMetadata(ILookup<MetadataInformation, CompatDifference> compatDifferencesLookup,
Microsoft.DotNet.Arcade.Sdk (1)
src\InstallDotNetCore.cs (1)
90System.Linq.ILookup<string, ProjectProperty> properties = null;
netstandard (1)
netstandard.cs (1)
1030[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.ILookup<,>))]
NuGet.Build.Tasks.Pack (2)
PackTaskLogic.cs (2)
919var projectPathToLibraryIdentities = assetsFile 947var libraryIdentityToTargetLibrary = target
NuGet.Commands (1)
RestoreCommand\ProjectRestoreCommand.cs (1)
60var runtimesByFramework = frameworkRuntimePairs.ToLookup(p => p.Framework, p => p.RuntimeIdentifier);
NuGet.Configuration (1)
ClientCertificate\ClientCertificateProvider.cs (1)
67var groupedByPackageSourceItems = result.ToLookup(i => i.PackageSource, i => i, StringComparer.OrdinalIgnoreCase);
NuGet.Frameworks (1)
CompatibilityListProvider.cs (1)
43var lookup = frameworks.ToLookup(f => f.IsPCL);
NuGet.PackageManagement (2)
Utility\FileSystemUtility.cs (1)
273var directoryLookup = filesToDelete.ToLookup(p => Path.GetDirectoryName(p));
Utility\MSBuildNuGetProjectSystemUtility.cs (1)
224var directoryLookup = frameworkSpecificGroup.Items.ToLookup(
System.Core (1)
System.Core.cs (1)
168[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.ILookup<,>))]
System.Linq (6)
System\Linq\DebugView.cs (2)
112private readonly ILookup<TKey, TElement> _lookup; 114public SystemLinq_LookupDebugView(ILookup<TKey, TElement> lookup)
System\Linq\Lookup.cs (4)
13public static ILookup<TKey, TSource> ToLookup<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) => 16public static ILookup<TKey, TSource> ToLookup<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) 36public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) => 39public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer)
System.Linq.AsyncEnumerable (20)
System\Linq\ToLookupAsync.cs (20)
16/// Creates a <see cref="ILookup{TKey, TElement}"/> from an <see cref="IAsyncEnumerable{T}"/> 21/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="ILookup{TKey, TElement}"/> from.</param> 25/// <returns>A <see cref="ILookup{TKey, TElement}"/> that contains keys and values.</returns> 28public static ValueTask<ILookup<TKey, TSource>> ToLookupAsync<TSource, TKey>( 39static async ValueTask<ILookup<TKey, TSource>> Impl( 64/// Creates a <see cref="ILookup{TKey, TElement}"/> from an <see cref="IAsyncEnumerable{T}"/> 69/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="ILookup{TKey, TElement}"/> from.</param> 73/// <returns>A <see cref="ILookup{TKey, TElement}"/> that contains keys and values.</returns> 76public static ValueTask<ILookup<TKey, TSource>> ToLookupAsync<TSource, TKey>( 87static async ValueTask<ILookup<TKey, TSource>> Impl( 113/// Creates a <see cref="ILookup{TKey, TElement}"/> from an <see cref="IAsyncEnumerable{T}"/> 119/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="ILookup{TKey, TElement}"/> from.</param> 124/// <returns>A <see cref="ILookup{TKey, TElement}"/> that contains keys and values.</returns> 127public static ValueTask<ILookup<TKey, TElement>> ToLookupAsync<TSource, TKey, TElement>( 140static async ValueTask<ILookup<TKey, TElement>> Impl( 166/// Creates a <see cref="ILookup{TKey, TElement}"/> from an <see cref="IAsyncEnumerable{T}"/> 172/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="ILookup{TKey, TElement}"/> from.</param> 177/// <returns>A <see cref="ILookup{TKey, TElement}"/> that contains keys and values.</returns> 180public static ValueTask<ILookup<TKey, TElement>> ToLookupAsync<TSource, TKey, TElement>( 193static async ValueTask<ILookup<TKey, TElement>> Impl(
System.Linq.Parallel (4)
System\Linq\ParallelEnumerable.cs (4)
5112public static ILookup<TKey, TSource> ToLookup<TSource, TKey>( 5137public static ILookup<TKey, TSource> ToLookup<TSource, TKey>( 5191public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>( 5223public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>(
System.Linq.Queryable (1)
System\Linq\EnumerableRewriter.cs (1)
217private static ILookup<string, MethodInfo>? s_seqMethods;