5 implementations of IGrouping
Microsoft.CodeAnalysis (1)
Collections\Grouping.cs (1)
15internal class Grouping<TKey, TElement> : IGrouping<TKey, TElement>
Microsoft.Data.Analysis (1)
GroupBy.cs (1)
78private class Grouping : IGrouping<TKey, DataFrameRow>
System.Linq (1)
System\Linq\Grouping.cs (1)
354internal sealed class Grouping<TKey, TElement> : IGrouping<TKey, TElement>, IList<TElement>
System.Linq.Parallel (2)
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (2)
679internal sealed class GroupByGrouping<TGroupKey, TElement> : IGrouping<TGroupKey, TElement> 725internal sealed class OrderedGroupByGrouping<TGroupKey, TOrderKey, TElement> : IGrouping<TGroupKey, TElement>
264 references to IGrouping
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
136foreach (var projectGroup in slowestFiles)
Aspire.Dashboard.Components.Tests (1)
Controls\StructuredLogDetailsTests.cs (1)
69var duplicate = properties.GroupBy(p => p.Key).Where(g => g.Count() >= 2).FirstOrDefault();
Aspire.Hosting (1)
Dcp\ApplicationExecutor.cs (1)
1272foreach (var group in executableResources.GroupBy(e => e.ModelResource))
CodeGenerator (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
318static string AppendSwitch(IEnumerable<IGrouping<int, KnownHeader>> values) =>
IdeCoreBenchmarks (1)
NavigateToBenchmarks.cs (1)
226private async Task<int> SearchAsync(Solution solution, IGrouping<INavigateToSearchService, Project> grouping, ImmutableArray<Document> priorityDocuments)
installer.tasks (1)
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (1)
117foreach (var miscount in results
IOperationGenerator (1)
IOperationClassWriter.cs (1)
103foreach (var grouping in _tree.Types.OfType<AbstractNode>().GroupBy(n => n.Namespace))
Microsoft.AspNetCore.App.Analyzers (2)
Mvc\DetectAmbiguousActionRoutes.cs (1)
38foreach (var ambiguousGroup in groupedByParent.Where(g => g.Count() >= 2))
RouteHandlers\DetectAmbiguousRoutes.cs (1)
34foreach (var ambiguousGroup in groupedByParent.Where(g => g.Count() >= 2))
Microsoft.AspNetCore.Mvc.Core (2)
Routing\AttributeRoute.cs (2)
111foreach (var group in groups) 128private static IEnumerable<IGrouping<RouteInfo, ActionDescriptor>> GetInboundRouteGroups(List<RouteInfo> routeInfos)
Microsoft.AspNetCore.Mvc.Razor (1)
ApplicationParts\RazorCompiledItemFeatureProvider.cs (1)
22var duplicates = provider.CompiledItems
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
CompilationFailedExceptionFactory.cs (2)
32foreach (var group in messageGroups) 58foreach (var group in diagnosticGroups)
Microsoft.AspNetCore.OpenApi (2)
Services\OpenApiDocumentService.cs (2)
235IGrouping<string?, ApiDescription> descriptions, 515foreach (var parameter in groupedFormParameters)
Microsoft.AspNetCore.Routing (6)
Matching\ILEmitTrieFactory.cs (6)
126void EmitIfLadder(Span<IGrouping<int, (string text, int destination)>> groups) 134var group = groups[i]; 344void EmitIfLadder(Span<IGrouping<ulong, (string test, int destination)>> groups) 352foreach (var group in groups) 469void EmitIfLadder(Span<IGrouping<ushort, (string test, int destination)>> groups) 478foreach (var group in groups)
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
41foreach (var group in groups)
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
48foreach (var group in groups)
Microsoft.AspNetCore.Routing.Tests (2)
Matching\RouteMatcherBuilder.cs (1)
41foreach (var group in groups)
Matching\TreeRouterMatcherBuilder.cs (1)
48foreach (var group in groups)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
318static string AppendSwitch(IEnumerable<IGrouping<int, KnownHeader>> values) =>
Microsoft.Build.Tasks.CodeAnalysis (1)
GenerateMSBuildEditorConfig.cs (1)
84foreach (var group in groupedItems)
Microsoft.Build.Tasks.Core (2)
GetSDKReferenceFiles.cs (2)
1028IEnumerable<IGrouping<string, string>> groupedByDirectory = 1032foreach (IGrouping<string, string> group in groupedByDirectory)
Microsoft.Cci.Extensions (1)
Mappings\AttributesMapping.cs (1)
45foreach (var attrGroup in attrGroups)
Microsoft.CodeAnalysis (23)
CommandLine\ReportAnalyzerUtil.cs (2)
84foreach (var analyzerGroup in analyzersByAssembly) 131foreach (var generatorGroup in generatorsByAssembly)
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
341foreach (var diagsByKey in diagnostics.GroupBy(getKeyFunc))
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
1458foreach (var analyzerAndActions in actionsByAnalyzers) 1489foreach (var analyzerAndActions in actionsByAnalyzers) 1832foreach (var groupedActions in symbolEndActions.GroupBy(a => a.Analyzer))
InternalUtilities\EnumerableExtensions.cs (1)
792foreach (var grouping in groups)
MetadataReader\MetadataHelpers.cs (11)
769IEnumerable<IGrouping<string, TypeDefinitionHandle>> typesByNS, 771out IEnumerable<IGrouping<string, TypeDefinitionHandle>> types, 772out IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>> namespaces) 779var nestedTypes = new List<IGrouping<string, TypeDefinitionHandle>>(); 786var nestedNamespaces = new List<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>>(); 795var pair = enumerator.Current; 802List<IGrouping<string, TypeDefinitionHandle>> typesInLastChildNamespace = null; 852new KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>( 856typesInLastChildNamespace = new List<IGrouping<string, TypeDefinitionHandle>>(); 870new KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>( 903nestedNamespaces[i] = default(KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>);
MetadataReader\PEModule.cs (5)
664internal IEnumerable<IGrouping<string, TypeDefinitionHandle>> GroupTypesByNamespaceOrThrow(StringComparer nameComparer) 678var result = new ArrayBuilder<IGrouping<string, TypeDefinitionHandle>>(namespaces.Count); 689internal class TypesByNamespaceSortComparer : IComparer<IGrouping<string, TypeDefinitionHandle>> 698public int Compare(IGrouping<string, TypeDefinitionHandle> left, IGrouping<string, TypeDefinitionHandle> right)
Microsoft.CodeAnalysis.CodeStyle (5)
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (2)
46foreach (var group in groups) 59foreach (var languageGroup in languageGroups)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
640foreach (var group in documentationComments.GroupBy(d => d.SyntaxTree))
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
792foreach (var grouping in groups)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
12public static void Deconstruct<TKey, TElement>(this IGrouping<TKey, TElement> grouping,
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
62foreach (var fieldDeclarators in declaratorsByField)
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (2)
161foreach (var group in groupedLocations) 171Solution currentSolution, IGrouping<Document, ReferenceLocation> group, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (3)
239private static IEnumerable<IGrouping<SyntaxNode, Diagnostic>> GetDiagnosticsGroupedByMember( 264private static IEnumerable<IGrouping<SyntaxNode, Diagnostic>> GetDiagnosticsGroupedByMember( 322foreach (var diagnosticsToFix in diagnosticsGroupedByMember)
Microsoft.CodeAnalysis.CSharp (11)
BoundTree\LengthBasedStringSwitchData.cs (1)
187foreach (var group in casesWithGivenLength.GroupBy(c => c.value[bestCharacterPosition]))
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.cs (2)
87IEnumerable<IGrouping<string, TypeDefinitionHandle>> groups; 95groups = SpecializedCollections.EmptyEnumerable<IGrouping<string, TypeDefinitionHandle>>();
Symbols\Metadata\PE\PENamespaceSymbol.cs (6)
207protected void LoadAllMembers(IEnumerable<IGrouping<string, TypeDefinitionHandle>> typesByNS) 212IEnumerable<IGrouping<string, TypeDefinitionHandle>> nestedTypes = null; 219IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>> nestedNamespaces = null; 253IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>> childNamespaces) 272private void LazyInitializeTypes(IEnumerable<IGrouping<string, TypeDefinitionHandle>> typeGroups) 282foreach (var g in typeGroups)
Symbols\Metadata\PE\PENestedNamespaceSymbol.cs (2)
50private IEnumerable<IGrouping<string, TypeDefinitionHandle>> _typesByNS; 73IEnumerable<IGrouping<string, TypeDefinitionHandle>> typesByNS)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
533foreach (var group in removedMembers.Values.GroupBy(n => n.memberNode.SyntaxTree))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenAsyncLocalsTests.cs (1)
965IEnumerable<IGrouping<TypeSymbol, FieldSymbol>> spillFieldsByType = stateMachineClass.GetMembers().Where(m => m.Kind == SymbolKind.Field && m.Name.StartsWith("<>7__wrap", StringComparison.Ordinal)).Cast<FieldSymbol>().GroupBy(x => x.Type);
Microsoft.CodeAnalysis.CSharp.Features (3)
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
241foreach (var group in symbols.GroupBy(s => s.Name))
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
275foreach (var group in parameter.ContainingType.DeclaringSyntaxReferences.GroupBy(r => r.SyntaxTree))
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
533foreach (var group in removedMembers.Values.GroupBy(n => n.memberNode.SyntaxTree))
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (1)
465foreach (var annotations in annotationsByMethod)
DiagnosticTestUtilities.cs (1)
189foreach (var expectedGroup in expectedCodes)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeActions\CodeChangeProviderMetadataTests.cs (1)
66foreach (var namedGroup in exportedProvidersByName)
Microsoft.CodeAnalysis.Features (16)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
74foreach (var grouping in diagnosticsByDocument.GroupBy(d => d.Key.Project))
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (1)
135foreach (var removeSuppressionFixesForTree in attributeRemoveFixes.GroupBy(fix => fix.SyntaxTreeToModify))
EditAndContinue\DebuggingSession.cs (2)
396private static ImmutableDictionary<K, ImmutableArray<V>> GroupToImmutableDictionary<K, V>(IEnumerable<IGrouping<K, V>> items) 401foreach (var item in items)
ExternalAccess\VSTypeScript\VSTypeScriptNavigateToSearchService.cs (1)
65foreach (var group in priorityDocuments.GroupBy(d => d.Project))
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
129IGrouping<ProjectKey, DocumentKey> group,
NavigateTo\NavigateToSearcher.cs (2)
364foreach (var group in groups) 378async ValueTask SearchCoreAsync(IGrouping<INavigateToSearchService, Project> grouping, CancellationToken cancellationToken)
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
198foreach (var group in referencesByDocument)
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (1)
46foreach (var group in groups)
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
62foreach (var fieldDeclarators in declaratorsByField)
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (2)
161foreach (var group in groupedLocations) 171Solution currentSolution, IGrouping<Document, ReferenceLocation> group, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (3)
239private static IEnumerable<IGrouping<SyntaxNode, Diagnostic>> GetDiagnosticsGroupedByMember( 264private static IEnumerable<IGrouping<SyntaxNode, Diagnostic>> GetDiagnosticsGroupedByMember( 322foreach (var diagnosticsToFix in diagnosticsGroupedByMember)
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
393foreach (var group in actions.GroupBy(a => a.CodeActionPriority))
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (1)
104foreach (var methodGroup in handlerProvider
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (1)
101foreach (var methodGroup in handlerProvider
Microsoft.CodeAnalysis.UnitTests (8)
MetadataReferences\MetadataHelpersTests.cs (8)
426var result = new ArrayBuilder<IGrouping<string, TypeDefinitionHandle>>(); 436IEnumerable<IGrouping<string, TypeDefinitionHandle>> typesByNS = result; 440IEnumerable<IGrouping<string, TypeDefinitionHandle>> nestedTypes = null; 441IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>> nestedNamespaces = null; 466var result = new ArrayBuilder<IGrouping<string, TypeDefinitionHandle>>(); 476IEnumerable<IGrouping<string, TypeDefinitionHandle>> typesByNS = result; 480IEnumerable<IGrouping<string, TypeDefinitionHandle>> nestedTypes = null; 481IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>> nestedNamespaces = null;
Microsoft.CodeAnalysis.Workspaces (15)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (2)
69foreach (var group in docIdToTextMerger.GroupBy(kvp => kvp.Key.ProjectId)) 207foreach (var group in allChangedDocumentsInDiagnosticsOrder.GroupBy(d => d.Id))
Diagnostics\Extensions.cs (1)
222foreach (var group in additionalPragmaSuppressionDiagnostics.GroupBy(d => d.Location.SourceTree!))
Editing\SymbolEditor.cs (2)
465foreach (var declGroup in declsByDocId) 480foreach (var declGroup in declsByDocId)
FindSymbols\ReferenceLocationExtensions.cs (2)
24foreach (var projectGroup in projectGroups) 33foreach (var documentGroup in projectGroup)
ReassignedVariable\AbstractReassignedVariableService.cs (1)
198foreach (var group in containingType.DeclaringSyntaxReferences.GroupBy(r => r.SyntaxTree))
Rename\ConflictEngine\ConflictResolver.cs (1)
202foreach (var implicitReferenceLocationsPerLanguage in implicitReferenceLocations.GroupBy(loc => loc.Document.Project.Language))
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
113foreach (var documentsByProject in documentsGroupedByTopologicallySortedProjectId)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
335foreach (var documentsGroupedByLanguage in RenameUtilities.GetDocumentsAffectedByRename(originalSymbol, solution, renameLocations).GroupBy(d => d.Project.Language))
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
792foreach (var grouping in groups)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
12public static void Deconstruct<TKey, TElement>(this IGrouping<TKey, TElement> grouping,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
206foreach (var group in accessors.GroupBy(node => node.SyntaxTree))
Workspace\Solution\SolutionCompilationState.cs (1)
1695foreach (var documentIdsInProject in documentIdsByProjectId)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
792foreach (var grouping in groups)
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
AbstractLanguageServer.cs (1)
104foreach (var methodGroup in handlerProvider
RequestExecutionQueue.cs (1)
101foreach (var methodGroup in handlerProvider
Microsoft.Data.Analysis (1)
GroupBy.cs (1)
499public IEnumerable<IGrouping<TKey, DataFrameRow>> Groupings
Microsoft.Data.Analysis.Tests (2)
DataFrameGroupByTests.cs (2)
35var oddGroup = grouping.Where(gr => gr.Key == "odd").FirstOrDefault(); 39var evenGroup = grouping.Where(gr => gr.Key == "even").FirstOrDefault();
Microsoft.DotNet.Build.Tasks.Installers (1)
src\GenerateJsonObjectString.cs (1)
43foreach (var group in Properties.GroupBy(item => item.ItemSpec))
Microsoft.DotNet.Build.Tasks.Packaging (6)
GenerateRuntimeDependencies.cs (3)
92foreach (var runtimeGroup in runtimeGroups) 110foreach (var targetPackageGroup in targetPackageGroups) 116foreach (var dependencyGroup in dependencyGroups)
GetSupportedPackagesFromPackageReports.cs (1)
34foreach (var fxRIDGrouping in fxRIDGroupings)
PackageIndex.cs (2)
786internal IEnumerable<IGrouping<string, string>> GetMetaPackageGrouping() 838foreach(var metaPackage in ((MetaPackages)value).GetMetaPackageGrouping())
Microsoft.Extensions.DependencyModel (3)
DependencyContextJsonReader.cs (1)
785foreach (IGrouping<string?, RuntimeTargetEntryStub> ridGroup in targetLibrary.RuntimeTargets.GroupBy(e => e.Rid))
DependencyContextWriter.cs (2)
407IEnumerable<IGrouping<string, Library>> allLibraries = 412foreach (IGrouping<string, Library> libraryGroup in allLibraries)
Microsoft.Extensions.Logging.AzureAppServices (2)
BlobLoggerProvider.cs (1)
61foreach (var eventGroup in eventGroups)
FileLoggerProvider.cs (1)
43foreach (var group in messages.GroupBy(GetGrouping))
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
75foreach (IGrouping<SyntaxTree, ClassDeclarationSyntax> group in classes.GroupBy(x => x.SyntaxTree))
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
50foreach (var group in classes.GroupBy(x => x.TypeSyntax.SyntaxTree))
Microsoft.Gen.ComplianceReports (2)
Parser.cs (2)
35IEnumerable<IGrouping<SyntaxTree, TypeDeclarationSyntax>> typesBySyntaxTree = classes.GroupBy(x => x.SyntaxTree); 36foreach (var typeForSyntaxTree in typesBySyntaxTree)
Microsoft.Gen.ContextualOptions (2)
ContextReceiver.cs (1)
51.ToDictionary<IGrouping<ISymbol?, TypeDeclarationSyntax>, INamedTypeSymbol, List<TypeDeclarationSyntax>>(
ContextualOptionsGenerator.cs (1)
43.ToDictionary<IGrouping<ISymbol?, TypeDeclarationSyntax>, INamedTypeSymbol, List<TypeDeclarationSyntax>>(
Microsoft.Gen.Logging (1)
Parsing\Parser.cs (1)
51foreach (var group in types.GroupBy(x => x.SyntaxTree))
Microsoft.Gen.Metrics (1)
Parser.cs (1)
68foreach (var typeDeclarationGroup in types.GroupBy(x => x.SyntaxTree))
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
68foreach (var typeDeclarationGroup in types.GroupBy(x => x.SyntaxTree))
Microsoft.Interop.ComInterfaceGenerator (1)
VtableIndexStubGenerator.cs (1)
436private static MemberDeclarationSyntax GeneratePopulateVTableMethod(IGrouping<ContainingSyntaxContext, IncrementalMethodStubGenerationContext> vtableMethods)
Microsoft.ML.AutoML (2)
ColumnInference\ColumnGroupingInference.cs (1)
72foreach (var g in grouped)
ColumnInference\TextFileContents.cs (1)
110var mostCommon = columnCounts.GroupBy(x => x).OrderByDescending(x => x.Count()).First();
Microsoft.ML.Fairlearn (1)
Metrics\FairlearnMetricCatalog.cs (1)
188foreach (var kv in groups)
Microsoft.VisualStudio.LanguageServices (1)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
475foreach (var group in builder.GroupBy(kvp => kvp.Key.ProjectId))
netstandard (1)
netstandard.cs (1)
1029[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.IGrouping<,>))]
PrepareTests (4)
MinimizeUtil.cs (4)
155foreach (var group in grouping) 177foreach (var noDuplicate in noDuplicatesGrouping) 190static void writeWindowsRehydrateContent(StringBuilder builder, IGrouping<string, (Guid Id, FilePathInfo FilePath)> group) 235static void writeUnixRehydrateContent(StringBuilder builder, IGrouping<string, (Guid Id, FilePathInfo FilePath)> group)
System.Core (1)
System.Core.cs (1)
167[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.IGrouping<,>))]
System.Linq (36)
System\Linq\DebugView.cs (2)
114private IGrouping<TKey, TElement>[]? _cachedGroupings; 122public IGrouping<TKey, TElement>[] Groupings => _cachedGroupings ??= _lookup.ToArray();
System\Linq\Grouping.cs (8)
12public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) => 15public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) 35public static IEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) => 38public static IEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) 238private sealed partial class GroupByIterator<TSource, TKey, TElement> : Iterator<IGrouping<TKey, TElement>> 256private protected override Iterator<IGrouping<TKey, TElement>> Clone() => new GroupByIterator<TSource, TKey, TElement>(_source, _keySelector, _elementSelector, _comparer); 293private sealed partial class GroupByIterator<TSource, TKey> : Iterator<IGrouping<TKey, TSource>> 309private protected override Iterator<IGrouping<TKey, TSource>> Clone() => new GroupByIterator<TSource, TKey>(_source, _keySelector, _comparer);
System\Linq\Grouping.SpeedOpt.cs (4)
36public override IGrouping<TKey, TElement>[] ToArray() => 39public override List<IGrouping<TKey, TElement>> ToList() => 48public override IGrouping<TKey, TSource>[] ToArray() => 51public override List<IGrouping<TKey, TSource>> ToList() =>
System\Linq\Lookup.cs (22)
64public interface ILookup<TKey, TElement> : IEnumerable<IGrouping<TKey, TElement>> 138public IEnumerator<IGrouping<TKey, TElement>> GetEnumerator() 262internal sealed class CollectionLookup<TKey, TElement> : Lookup<TKey, TElement>, ICollection<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>> 266void ICollection<IGrouping<TKey, TElement>>.CopyTo(IGrouping<TKey, TElement>[] array, int arrayIndex) 288bool ICollection<IGrouping<TKey, TElement>>.Contains(IGrouping<TKey, TElement> item) 294bool ICollection<IGrouping<TKey, TElement>>.IsReadOnly => true; 295void ICollection<IGrouping<TKey, TElement>>.Add(IGrouping<TKey, TElement> item) => throw new NotSupportedException(); 296void ICollection<IGrouping<TKey, TElement>>.Clear() => throw new NotSupportedException(); 297bool ICollection<IGrouping<TKey, TElement>>.Remove(IGrouping<TKey, TElement> item) => throw new NotSupportedException(); 302internal sealed class EmptyLookup<TKey, TElement> : ILookup<TKey, TElement>, ICollection<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>> 309public IEnumerator<IGrouping<TKey, TElement>> GetEnumerator() => Enumerable.Empty<IGrouping<TKey, TElement>>().GetEnumerator(); 313public bool Contains(IGrouping<TKey, TElement> item) => false; 314public void CopyTo(IGrouping<TKey, TElement>[] array, int arrayIndex) 322public void Add(IGrouping<TKey, TElement> item) => throw new NotSupportedException(); 324public bool Remove(IGrouping<TKey, TElement> item) => throw new NotSupportedException();
System.Linq.Parallel (49)
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (19)
30UnaryQueryOperator<TSource, IGrouping<TGroupKey, TElement>> 69PartitionedStream<TSource, TKey> inputStream, IPartitionedStreamRecipient<IGrouping<TGroupKey, TElement>> recipient, 100IPartitionedStreamRecipient<IGrouping<TGroupKey, TElement>> recipient, 104PartitionedStream<IGrouping<TGroupKey, TElement>, TKey> outputStream = 105new PartitionedStream<IGrouping<TGroupKey, TElement>, TKey>(partitionCount, hashStream.KeyComparer, OrdinalIndexState.Shuffled); 119outputStream[i] = (QueryOperatorEnumerator<IGrouping<TGroupKey, TElement>, TKey>)(object)enumerator; 138IPartitionedStreamRecipient<IGrouping<TGroupKey, TElement>> recipient, 142PartitionedStream<IGrouping<TGroupKey, TElement>, TKey> outputStream = 143new PartitionedStream<IGrouping<TGroupKey, TElement>, TKey>(partitionCount, hashStream.KeyComparer, OrdinalIndexState.Shuffled); 158outputStream[i] = (QueryOperatorEnumerator<IGrouping<TGroupKey, TElement>, TKey>)(object)enumerator; 174internal override QueryResults<IGrouping<TGroupKey, TElement>> Open(QuerySettings settings, bool preferStriping) 187internal override IEnumerable<IGrouping<TGroupKey, TElement>> AsSequentialQuery(CancellationToken token) 193return (IEnumerable<IGrouping<TGroupKey, TElement>>)wrappedChild.GroupBy(_keySelector, _keyComparer); 222QueryOperatorEnumerator<IGrouping<TGroupKey, TElement>, TOrderKey> 256internal override bool MoveNext([MaybeNullWhen(false), AllowNull] ref IGrouping<TGroupKey, TElement> currentElement, [AllowNull] ref TOrderKey currentKey) 423QueryOperatorEnumerator<IGrouping<TGroupKey, TElement>, TOrderKey> 462internal override bool MoveNext([MaybeNullWhen(false), AllowNull] ref IGrouping<TGroupKey, TElement> currentElement, [AllowNull] ref TOrderKey currentKey) 697TGroupKey IGrouping<TGroupKey, TElement>.Key 749TGroupKey IGrouping<TGroupKey, TElement>.Key
System\Linq\Parallel\Utils\Lookup.cs (8)
39private readonly Dictionary<TKey, IGrouping<TKey, TElement>> _dict; 41private IGrouping<TKey, TElement>? _defaultKeyGrouping; 46_dict = new Dictionary<TKey, IGrouping<TKey, TElement>>(_comparer); 79IGrouping<TKey, TElement>? grouping; 111internal void Add(IGrouping<TKey, TElement> grouping) 127public IEnumerator<IGrouping<TKey, TElement>> GetEnumerator() 132foreach (IGrouping<TKey, TElement> grouping in _dict.Values) 145return ((IEnumerable<IGrouping<TKey, TElement>>)this).GetEnumerator();
System\Linq\ParallelEnumerable.cs (22)
1296public static ParallelQuery<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>( 1315public static ParallelQuery<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>( 1342public static ParallelQuery<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>( 1368public static ParallelQuery<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>( 1414.Select<IGrouping<TKey, TSource>, TResult>(delegate (IGrouping<TKey, TSource> grouping) { return resultSelector(grouping.Key, grouping); }); 1440return source.GroupBy<TSource, TKey>(keySelector, comparer).Select<IGrouping<TKey, TSource>, TResult>( 1441delegate (IGrouping<TKey, TSource> grouping) { return resultSelector(grouping.Key, grouping); }); 1471.Select<IGrouping<TKey, TElement>, TResult>(delegate (IGrouping<TKey, TElement> grouping) { return resultSelector(grouping.Key, grouping); }); 1502.Select<IGrouping<TKey, TElement>, TResult>(delegate (IGrouping<TKey, TElement> grouping) { return resultSelector(grouping.Key, grouping); }); 5146ParallelQuery<IGrouping<TKey, TSource>> groupings = source.GroupBy(keySelector, comparer); 5150Debug.Assert(groupings is QueryOperator<IGrouping<TKey, TSource>>); 5151QueryOperator<IGrouping<TKey, TSource>>? op = groupings as QueryOperator<IGrouping<TKey, TSource>>; 5153IEnumerator<IGrouping<TKey, TSource>> input = (op == null) ? groupings.GetEnumerator() : op.GetEnumerator(ParallelMergeOptions.FullyBuffered); 5233ParallelQuery<IGrouping<TKey, TElement>> groupings = source.GroupBy(keySelector, elementSelector, comparer); 5237Debug.Assert(groupings is QueryOperator<IGrouping<TKey, TElement>>); 5238QueryOperator<IGrouping<TKey, TElement>>? op = groupings as QueryOperator<IGrouping<TKey, TElement>>; 5240IEnumerator<IGrouping<TKey, TElement>> input = (op == null) ? groupings.GetEnumerator() : op.GetEnumerator(ParallelMergeOptions.FullyBuffered);
System.Linq.Queryable (14)
System\Linq\EnumerableRewriter.cs (2)
129if (t.IsGenericType && t.GetGenericTypeDefinition().GetInterfaces().Contains(typeof(IGrouping<,>))) 130return typeof(IGrouping<,>).MakeGenericType(t.GetGenericArguments());
System\Linq\Queryable.cs (12)
654public static IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 659return source.Provider.CreateQuery<IGrouping<TKey, TSource>>( 662new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IQueryable<IGrouping<TKey, TSource>>>(GroupBy).Method, 667public static IQueryable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector) 673return source.Provider.CreateQuery<IGrouping<TKey, TElement>>( 676new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, IQueryable<IGrouping<TKey, TElement>>>(GroupBy).Method, 681public static IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer) 686return source.Provider.CreateQuery<IGrouping<TKey, TSource>>( 689new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TKey, TSource>>>(GroupBy).Method, 694public static IQueryable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, IEqualityComparer<TKey>? comparer) 700return source.Provider.CreateQuery<IGrouping<TKey, TElement>>( 703new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TKey, TElement>>>(GroupBy).Method,
xunit.console (1)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (1)
391foreach (var ridGroup in targetLibrary.RuntimeTargets.GroupBy(e => e.Rid))