9 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>
Microsoft.TemplateEngine.Utils (1)
ListExtensions.cs (1)
106private class Grouping<TKey, TElement> : IGrouping<TKey, TElement>
System.Linq (2)
System\Linq\Grouping.cs (1)
354internal sealed class Grouping<TKey, TElement> : IGrouping<TKey, TElement>, IList<TElement>
System\Linq\GroupJoin.cs (1)
127internal sealed class GroupJoinGrouping<TKey, TElement> : IGrouping<TKey, TElement>
System.Linq.AsyncEnumerable (2)
System\Linq\GroupBy.cs (1)
389internal sealed class Grouping<TKey, TElement> : IGrouping<TKey, TElement>, IList<TElement>
System\Linq\GroupJoin.cs (1)
262internal sealed class AsyncGroupJoinGrouping<TKey, TElement> : IGrouping<TKey, 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>
434 references to IGrouping
aspire (9)
Commands\DoctorCommand.cs (1)
101foreach (var group in groupedResults)
Commands\NewCommand.cs (2)
321var implicitGroup = byChannel.FirstOrDefault(g => g.Key.Type is Packaging.PackageChannelType.Implicit); 383foreach (var channelGroup in explicitGroups)
Commands\Sdk\SdkDumpCommand.cs (1)
483foreach (var group in capsByTarget)
Packaging\NuGetConfigMerger.cs (3)
334foreach (var sourceGroup in patternsBySource) 397foreach (var sourceGroup in newPatternsBySource) 732foreach (var sourceGroup in patternsBySource)
Packaging\TemporaryNuGetConfig.cs (1)
85foreach (var sourceGroup in groupedBySource)
Projects\ProjectUpdater.cs (1)
50foreach (var projectGroup in updateStepsByProject)
Aspire.Confluent.Kafka.Tests (1)
OtelMetricsTests.cs (1)
65IGrouping<string, Metric>[] groups;
Aspire.Dashboard (4)
Components\Controls\ResourceDetails.razor.cs (2)
289foreach (var resourceRelationships in Resource.Relationships.GroupBy(r => r.ResourceName, StringComparers.ResourceName)) 320foreach (var resourceRelationships in otherResource.Relationships.GroupBy(r => r.ResourceName, StringComparers.ResourceName))
Components\Pages\ConsoleLogs.razor.cs (1)
658foreach (var grouping in resourcesByName
Model\ResourceGraph\ResourceGraphMapper.cs (1)
22foreach (var resourceRelationships in filteredRelationships.GroupBy(r => r.ResourceName, StringComparers.ResourceName))
Aspire.Dashboard.Components.Tests (1)
Controls\StructuredLogDetailsTests.cs (1)
68var duplicate = properties.GroupBy(p => p.Key).Where(g => g.Count() >= 2).FirstOrDefault();
Aspire.Hosting (2)
Dcp\DcpExecutor.cs (1)
1593foreach (var group in groups)
ProjectResourceBuilderExtensions.cs (1)
529foreach (var schemeGroup in kestrelEndpointsByScheme)
Aspire.Hosting.Azure (1)
AzureResourcePreparer.cs (1)
257foreach (var g in roleAssignments.GroupBy(r => r.Target))
Aspire.Hosting.RemoteHost (1)
AtsCapabilityScanner.cs (1)
862foreach (var g in collisionGroups)
dotnet (4)
CommandFactory\CommandResolution\LockFileTargetExtensions.cs (1)
72public static IEnumerable<IGrouping<string, LockFileRuntimeTarget>> GetRuntimeTargetsGroups(
Commands\Test\MTP\Terminal\TerminalTestReporter.cs (2)
176IEnumerable<IGrouping<bool, TestRunArtifact>> artifactGroups = _artifacts.GroupBy(a => a.OutOfProcess); 184foreach (IGrouping<bool, TestRunArtifact> artifactGroup in artifactGroups)
ToolPackage\LocalToolsResolverCache.cs (1)
37foreach (var distinctPackageIdAndRestoredCommandMap in restoredCommandMap.GroupBy(x => x.Key.PackageId))
GenerateDocumentationAndConfigFiles (4)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
769foreach (var grouping in groups)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
12public static void Deconstruct<TKey, TElement>(this IGrouping<TKey, TElement> grouping,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
206foreach (var group in accessors.GroupBy(node => node.SyntaxTree))
installer.tasks (1)
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (1)
117foreach (var miscount in results
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.Razor.Utilities.Shared (1)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
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.Build (1)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Extensions\IEnumerableExtensions.cs (1)
807foreach (var grouping in groups)
Microsoft.Build.Tasks.CodeAnalysis (1)
src\roslyn\src\Compilers\Core\MSBuildTask\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.Build.Tasks.Git (1)
GitDataReader\GitRepository.cs (1)
293foreach (var group in submoduleConfig.Variables.
Microsoft.CodeAnalysis (25)
CommandLine\ReportAnalyzerUtil.cs (3)
85foreach (var analyzerGroup in analyzersByAssembly) 137foreach (var group in byAssembly) 168foreach (var generatorGroup in generatorsByAssembly)
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
342foreach (var diagsByKey in diagnostics.GroupBy(getKeyFunc))
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
1473foreach (var analyzerAndActions in actionsByAnalyzers) 1504foreach (var analyzerAndActions in actionsByAnalyzers) 1847foreach (var groupedActions in symbolEndActions.GroupBy(a => a.Analyzer))
MetadataReader\MetadataHelpers.cs (11)
787IEnumerable<IGrouping<string, TypeDefinitionHandle>> typesByNS, 789[NotNull] out IEnumerable<IGrouping<string, TypeDefinitionHandle>>? types, 790[NotNull] out IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>>? namespaces) 797var nestedTypes = new List<IGrouping<string, TypeDefinitionHandle>>(); 804var nestedNamespaces = new List<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>>(); 813var pair = enumerator.Current; 820List<IGrouping<string, TypeDefinitionHandle>>? typesInLastChildNamespace = null; 876new KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>( 880typesInLastChildNamespace = new List<IGrouping<string, TypeDefinitionHandle>>(); 894new KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>( 927nestedNamespaces[i] = default(KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>);
MetadataReader\PEModule.cs (5)
667internal IEnumerable<IGrouping<string, TypeDefinitionHandle>> GroupTypesByNamespaceOrThrow(StringComparer nameComparer) 683var result = new ArrayBuilder<IGrouping<string, TypeDefinitionHandle>>(namespaces.Count); 694internal sealed class TypesByNamespaceSortComparer : IComparer<IGrouping<string, TypeDefinitionHandle>> 703public int Compare(IGrouping<string, TypeDefinitionHandle>? left, IGrouping<string, TypeDefinitionHandle>? right)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
769foreach (var grouping in groups)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
Microsoft.CodeAnalysis.Analyzers (4)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
769foreach (var grouping in groups)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
12public static void Deconstruct<TKey, TElement>(this IGrouping<TKey, TElement> grouping,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
206foreach (var group in accessors.GroupBy(node => node.SyntaxTree))
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
769foreach (var grouping in groups)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
12public static void Deconstruct<TKey, TElement>(this IGrouping<TKey, TElement> grouping,
Microsoft.CodeAnalysis.CodeStyle (6)
src\roslyn\src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (2)
41foreach (var group in groups) 54foreach (var languageGroup in languageGroups)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
794foreach (var group in documentationComments.GroupBy(d => d.SyntaxTree))
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
769foreach (var grouping in groups)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
12public static void Deconstruct<TKey, TElement>(this IGrouping<TKey, TElement> grouping,
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
103foreach (var documentLookup in locationsByDocument)
src\roslyn\src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
60foreach (var fieldDeclarators in declaratorsByField)
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (2)
159foreach (var group in groupedLocations) 169Solution currentSolution, IGrouping<Document, ReferenceLocation> group, CancellationToken cancellationToken)
src\roslyn\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)
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (2)
322foreach (var group in fieldLocations.SelectMany(loc => loc.Locations).GroupBy(loc => loc.Document)) 498foreach (var group in referencedSymbols.SelectMany(r => r.Locations).GroupBy(loc => loc.Document))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
206foreach (var group in accessors.GroupBy(node => node.SyntaxTree))
Microsoft.CodeAnalysis.CSharp (15)
BoundTree\LengthBasedStringSwitchData.cs (2)
154foreach (var group in inputCases.Where(c => !c.value.IsNull).GroupBy(c => c.value.StringValue!.Length)) 187foreach (var group in casesWithGivenLength.GroupBy(c => c.value[bestCharacterPosition]))
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.cs (2)
88IEnumerable<IGrouping<string, TypeDefinitionHandle>> groups; 96groups = SpecializedCollections.EmptyEnumerable<IGrouping<string, TypeDefinitionHandle>>();
Symbols\Metadata\PE\PENamespaceSymbol.cs (6)
211protected void LoadAllMembers(IEnumerable<IGrouping<string, TypeDefinitionHandle>> typesByNS) 216IEnumerable<IGrouping<string, TypeDefinitionHandle>>? nestedTypes = null; 223IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>>? nestedNamespaces = null; 258IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>> childNamespaces) 278private void LazyInitializeTypes(IEnumerable<IGrouping<string, TypeDefinitionHandle>> typeGroups) 288foreach (var g in typeGroups)
Symbols\Metadata\PE\PENestedNamespaceSymbol.cs (2)
50private IEnumerable<IGrouping<string, TypeDefinitionHandle>> _typesByNS; 73IEnumerable<IGrouping<string, TypeDefinitionHandle>> typesByNS)
Symbols\Source\SourceMemberContainerSymbol.cs (3)
2540IEnumerable<IGrouping<string, NamedTypeSymbol>> extensionsByReceiverType = GetTypeMembers("").Where(static t => t.IsExtension).GroupBy(static t => ((SourceNamedTypeSymbol)t).ExtensionGroupingName!); 2542foreach (var grouping in extensionsByReceiverType) 2556static (Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>? membersByName, ImmutableArray<Symbol> membersUnordered) mergeMembersInGroup(IGrouping<string, NamedTypeSymbol> grouping)
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\UnnecessaryNullableWarningSuppressionsUtilities.cs (2)
148foreach (var typeDeclarationGroup in inFieldsOrProperties.GroupBy(t => t.rewrittenAncestor.FirstAncestorOrSelf<TypeDeclarationSyntax>())) 168foreach (var ancestorGroup in nodes.GroupBy(t => t.rewrittenAncestor))
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryUnsafeModifier\UnnecessaryUnsafeModifierUtilities.cs (1)
64foreach (var group in nodesToCheck.GroupBy(node =>
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
435foreach (var group in orderedParameterAssignments.GroupBy(t => t.parameter))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\roslyn\src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
105foreach (var group in containersAndLocations.GroupBy(t => t.container))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (3)
531foreach (var group in removedMembers.Values.GroupBy(n => n.memberNode.SyntaxTree)) 604foreach (var group in nodesToReplace.GroupBy(n => n.SyntaxTree)) 620foreach (var group in seeTagsToReplace.GroupBy(n => n.SyntaxTree))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
123foreach (var group in groups)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
110foreach (var group in groups)
Microsoft.CodeAnalysis.CSharp.Features (16)
Completion\CompletionProviders\AwaitCompletionProvider.cs (1)
126foreach (var group in references.SelectMany(r => r.Locations).GroupBy(l => l.Location.SourceTree))
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
231foreach (var group in symbols.GroupBy(s => s.Name))
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (1)
129foreach (var opGroup in operatorGroups)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (2)
236foreach (var grouping in initializers.GroupBy(kvp => kvp.Value.SyntaxTree)) 366foreach (var grouping in references.GroupBy(r => r.SyntaxTree))
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
61foreach (var group in referenceByDocument)
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
274foreach (var group in parameter.ContainingType.DeclaringSyntaxReferences.GroupBy(r => r.SyntaxTree))
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\UnnecessaryNullableWarningSuppressionsUtilities.cs (2)
148foreach (var typeDeclarationGroup in inFieldsOrProperties.GroupBy(t => t.rewrittenAncestor.FirstAncestorOrSelf<TypeDeclarationSyntax>())) 168foreach (var ancestorGroup in nodes.GroupBy(t => t.rewrittenAncestor))
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryUnsafeModifier\UnnecessaryUnsafeModifierUtilities.cs (1)
64foreach (var group in nodesToCheck.GroupBy(node =>
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
435foreach (var group in orderedParameterAssignments.GroupBy(t => t.parameter))
src\roslyn\src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
105foreach (var group in containersAndLocations.GroupBy(t => t.container))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (3)
531foreach (var group in removedMembers.Values.GroupBy(n => n.memberNode.SyntaxTree)) 604foreach (var group in nodesToReplace.GroupBy(n => n.SyntaxTree)) 620foreach (var group in seeTagsToReplace.GroupBy(n => n.SyntaxTree))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
123foreach (var group in groups)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
110foreach (var group in groups)
Microsoft.CodeAnalysis.Extensions.Package (2)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
769foreach (var grouping in groups)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
Microsoft.CodeAnalysis.Features (27)
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))
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (2)
333foreach (var group in documentsToUpdate.GroupBy(d => d.Document.Project)) 531foreach (var group in declarationService.GetDeclarations(typeSymbol).GroupBy(r => r.SyntaxTree))
EditAndContinue\DebuggingSession.cs (2)
441private static ImmutableDictionary<K, ImmutableArray<V>> GroupToImmutableDictionary<K, V>(IEnumerable<IGrouping<K, V>> items) 446foreach (var item in items)
EditAndContinue\EditSession.cs (2)
911foreach (var partialTypeEdits in updatesByPartialType) 926foreach (var g in newMaps.GroupBy(m => m.NewTree))
ExternalAccess\VSTypeScript\VSTypeScriptNavigateToSearchService.cs (1)
65foreach (var group in priorityDocuments.GroupBy(d => d.Project))
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
233foreach (var group in nonLocalImports.GroupBy(i => i.DeclaringSyntaxReference?.SyntaxTree))
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
142IGrouping<ProjectKey, DocumentKey> group,
NavigateTo\NavigateToSearcher.cs (2)
365foreach (var group in groups) 379async ValueTask SearchCoreAsync(IGrouping<INavigateToSearchService, Project> grouping, CancellationToken cancellationToken)
Options\EditorConfig\EditorConfigFileGenerator.cs (1)
62foreach (var optionGrouping in options.GroupBy(o => o.Definition.Group).OrderBy(g => g.Key.Priority))
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
198foreach (var group in referencesByDocument)
src\roslyn\src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (2)
41foreach (var group in groups) 54foreach (var languageGroup in languageGroups)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
794foreach (var group in documentationComments.GroupBy(d => d.SyntaxTree))
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
103foreach (var documentLookup in locationsByDocument)
src\roslyn\src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
60foreach (var fieldDeclarators in declaratorsByField)
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (2)
159foreach (var group in groupedLocations) 169Solution currentSolution, IGrouping<Document, ReferenceLocation> group, CancellationToken cancellationToken)
src\roslyn\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)
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (2)
322foreach (var group in fieldLocations.SelectMany(loc => loc.Locations).GroupBy(loc => loc.Document)) 498foreach (var group in referencedSymbols.SelectMany(r => r.Locations).GroupBy(loc => loc.Document))
Microsoft.CodeAnalysis.Razor.Compiler (2)
Language\Components\ComponentEventHandlerLoweringPass.cs (2)
128foreach (var duplicate in duplicates) 147foreach (var duplicate in parameterDuplicates)
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
769foreach (var grouping in groups)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
12public static void Deconstruct<TKey, TElement>(this IGrouping<TKey, TElement> grouping,
Microsoft.CodeAnalysis.Workspaces (16)
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)
230foreach (var group in additionalPragmaSuppressionDiagnostics.GroupBy(d => d.Location.SourceTree!))
Editing\SymbolEditor.cs (2)
462foreach (var declGroup in declsByDocId) 477foreach (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)
195foreach (var implicitReferenceLocationsPerLanguage in implicitReferenceLocations.GroupBy(loc => loc.Document.Project.Language))
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
110foreach (var documentsByProject in documentsGroupedByTopologicallySortedProjectId)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
351foreach (var documentsGroupedByLanguage in RenameUtilities.GetDocumentsAffectedByRename(originalSymbol, solution, renameLocations).GroupBy(d => d.Project.Language))
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
769foreach (var grouping in groups)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
12public static void Deconstruct<TKey, TElement>(this IGrouping<TKey, TElement> grouping,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
206foreach (var group in accessors.GroupBy(node => node.SyntaxTree))
Workspace\Solution\SolutionCompilationState.cs (1)
1815foreach (var documentIdsInProject in documentIdsByProjectId)
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.ApiCompatibility (2)
ApiComparer.cs (1)
141foreach (IGrouping<MetadataInformation, CompatDifference> compatDifferenceGroup in compatDifferencesLookup)
Runner\ApiCompatRunner.cs (1)
61foreach (var differenceGroup in differenceGroups)
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.DotNet.HotReload.Watch (1)
Build\FilePathExclusions.cs (1)
74foreach (var globsPerDirectory in exclusionGlobs.GroupBy(keySelector: static g => g.projectDir, elementSelector: static g => g.value))
Microsoft.DotNet.PackageValidation (2)
Validators\BaselinePackageValidator.cs (2)
92IEnumerable<IGrouping<string, ContentItem>> baselineRuntimeSpecificAssetsRidGroupedPerRid = baselineRuntimeSpecificAssets 96foreach (IGrouping<string, ContentItem> baselineRuntimeSpecificAssetsRidGroup in baselineRuntimeSpecificAssetsRidGroupedPerRid)
Microsoft.Extensions.DependencyModel (3)
DependencyContextJsonReader.cs (1)
797foreach (IGrouping<string?, RuntimeTargetEntryStub> ridGroup in targetLibrary.RuntimeTargets.GroupBy(e => e.Rid))
DependencyContextWriter.cs (2)
422IEnumerable<IGrouping<string, Library>> allLibraries = 427foreach (IGrouping<string, Library> libraryGroup in allLibraries)
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
73foreach (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.MetadataExtractor (3)
src\Generators\Microsoft.Gen.ComplianceReports\Parser.cs (2)
35IEnumerable<IGrouping<SyntaxTree, TypeDeclarationSyntax>> typesBySyntaxTree = classes.GroupBy(x => x.SyntaxTree); 36foreach (var typeForSyntaxTree in typesBySyntaxTree)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
69foreach (var typeDeclarationGroup in types.GroupBy(x => x.SyntaxTree))
Microsoft.Gen.Metrics (1)
Parser.cs (1)
69foreach (var typeDeclarationGroup in types.GroupBy(x => x.SyntaxTree))
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
69foreach (var typeDeclarationGroup in types.GroupBy(x => x.SyntaxTree))
Microsoft.Interop.ComInterfaceGenerator (1)
VtableIndexStubGenerator.cs (1)
158foreach (var group in data.GroupBy(s => s.ContainingSyntaxContext))
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.NET.Build.Tasks (8)
CheckForDuplicateFrameworkReferences.cs (1)
40foreach (var duplicateItemGroup in duplicateItems)
CheckForImplicitPackageReferenceOverrides.cs (1)
33foreach (var duplicateItemGroup in duplicateItems)
DependencyContextBuilder.cs (4)
185foreach (var group in compileReferences.GroupBy(r => r.PackageName, StringComparer.OrdinalIgnoreCase)) 196foreach (var group in resolvedNuGetFiles.GroupBy(f => f.PackageName, StringComparer.OrdinalIgnoreCase)) 225foreach (var runtimePackGroup in runtimePackAssets.GroupBy(a => a.PackageName)) 687foreach (var runtimeIdentifierGroup in runtimeTargets)
LockFileExtensions.cs (1)
228public static IEnumerable<IGrouping<string, LockFileRuntimeTarget>> GetRuntimeTargetsGroups(
ProduceContentAssets.cs (1)
151foreach (var grouping in contentFileGroups)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (2)
GenerateStaticWebAssetEndpointsManifest.cs (1)
227foreach (var group in assetsByTargetPath)
GenerateStaticWebAssetsDevelopmentManifest.cs (1)
105foreach (var group in assetsByTargetPath)
Microsoft.TemplateEngine.Cli (10)
Commands\create\InstantiateCommand.cs (1)
61foreach (IGrouping<int, CliTemplateInfo> templateGrouping in templateGroup.Templates.GroupBy(g => g.Precedence).OrderByDescending(g => g.Key))
Commands\create\InstantiateCommand.Help.cs (1)
346foreach (IGrouping<int, CliTemplateInfo> templateGrouping in templateGroup.Templates.GroupBy(g => g.Precedence).OrderByDescending(g => g.Key))
Commands\create\InstantiateCommand.TabCompletion.cs (1)
50foreach (IGrouping<int, CliTemplateInfo> templateGrouping in GetAllowedTemplates(constraintManager, templateGroup).GroupBy(g => g.Precedence).OrderByDescending(g => g.Key))
TabularOutput\TemplateGroupDisplay.cs (6)
76foreach (var templates in groupedTemplates) 143IEnumerable<IGrouping<string?, ITemplateInfo>> groupedTemplateList = templateList.GroupBy(x => x.GroupIdentity, x => !string.IsNullOrEmpty(x.GroupIdentity), StringComparer.OrdinalIgnoreCase); 144foreach (IGrouping<string?, ITemplateInfo> templateGroup in groupedTemplateList) 172foreach (var templates in groupedTemplates) 244private static IOrderedEnumerable<IGrouping<string, ITemplateInfo>> GetAuthorBasedGroups(IEnumerable<ITemplateInfo> templateGroup) 257foreach (var templates in groupedTemplates)
TemplatePackageCoordinator.cs (1)
289foreach (var packagesGrouping in managedTemplatePackages.GroupBy(package => package.ManagedProvider))
Microsoft.TemplateEngine.Edge (1)
BuiltInManagedProvider\GlobalSettingsTemplatePackageProvider.cs (1)
85foreach (var packagesGroupedByInstaller in packages.GroupBy(s => s.Installer))
Microsoft.TemplateEngine.IDE (3)
Bootstrapper.cs (3)
304IEnumerable<IGrouping<IManagedTemplatePackageProvider, IManagedTemplatePackage>> requestsGroupedByProvider = managedPackages.GroupBy(package => package.ManagedProvider, package => package); 326IEnumerable<IGrouping<IManagedTemplatePackageProvider, UpdateRequest>> requestsGroupedByProvider = updateRequests.GroupBy(request => request.TemplatePackage.ManagedProvider, request => request); 348IEnumerable<IGrouping<IManagedTemplatePackageProvider, IManagedTemplatePackage>> requestsGroupedByProvider = managedPackages.GroupBy(package => package.ManagedProvider, package => package);
Microsoft.TemplateEngine.Utils (3)
ListExtensions.cs (3)
10public static IEnumerable<IGrouping<TKey?, TElement>> GroupBy<TElement, TKey>(this IEnumerable<TElement> elements, Func<TElement, TKey?> grouper, Func<TElement, bool> hasGroupKey, IEqualityComparer<TKey?>? comparer = null) 35List<IGrouping<TKey?, TElement>> allGrouped = new List<IGrouping<TKey?, TElement>>();
Microsoft.TestPlatform.CrossPlatEngine (4)
Client\Parallel\ParallelProxyDiscoveryManager.cs (1)
214foreach (var group in providerGroups)
Client\Parallel\ParallelProxyExecutionManager.cs (2)
256foreach (var group in providerGroups) 314foreach (var group in providerGroups)
TestEngine.cs (1)
453foreach (var runConfiguration in uniqueRunConfigurations)
netstandard (1)
netstandard.cs (1)
1029[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.IGrouping<,>))]
NuGet.CommandLine.XPlat (3)
Commands\ConfigCommands\ConfigRunners.cs (3)
208IEnumerable<IGrouping<string, SettingItem>> groupByConfigPathsQuery = 217foreach (IGrouping<string, SettingItem> configPathsGroup in groupByConfigPathsQueryReverse) 226foreach (IGrouping<string, SettingItem> configPathsGroup in groupByConfigPathsQueryReverse)
NuGet.Commands (6)
RestoreCommand\Diagnostics\DiagnosticUtility.cs (2)
112foreach (var codeGroup in messages.GroupBy(e => e.Code)) 114foreach (var messageGroup in codeGroup.GroupBy(e => e.Message, StringComparer.Ordinal))
RestoreCommand\ProjectRestoreCommand.cs (1)
65foreach (var pair in runtimesByFramework)
RestoreCommand\Utility\ToolRestoreUtility.cs (3)
103foreach (var toolIdGroup in tools.GroupBy(e => GetToolIdOrNullFromSpec(e.Request.Project), StringComparer.OrdinalIgnoreCase)) 125foreach (var packagesFolderGroup in requests.GroupBy(e => e.Request.PackagesDirectory, StringComparer.Ordinal)) 128foreach (var versionRangeGroup in packagesFolderGroup.GroupBy(e =>
NuGet.Packaging (9)
NuspecReader.cs (1)
220foreach (var group in MetadataNode.Elements(XName.Get(FrameworkAssemblies, ns)).Elements(XName.Get(FrameworkAssembly, ns))
Rules\InvalidUndottedFrameworkRule.cs (1)
149foreach (var group in metadataNode.Elements(XName.Get(FrameworkAssemblies, ns)).Elements(XName.Get(FrameworkAssembly, ns))
Rules\ReferencesInNuspecMatchRefAssetsRule.cs (3)
71foreach (var files in filesByTFM) 180internal List<string> GetAllKeys(IEnumerable<IGrouping<string, string>> filesByTFM) 183foreach (var item in filesByTFM)
Rules\UpholdBuildConventionRule.cs (3)
68foreach (var buildFolder in msbuildFilesGroupedByBuildFolder) 70foreach (var tfm in buildFolder.GroupBy(GetTfm)) 72foreach (var extension in tfm.GroupBy(Path.GetExtension))
RuntimeModel\JsonRuntimeFormat.cs (1)
149foreach (var frameworkGroup in frameworkGroups)
NuGet.ProjectModel (1)
PackageSpecWriter.cs (1)
507foreach (var dependency in downloadDependencies.GroupBy(dep => dep.Name).OrderBy(dep => dep.Key))
NuGet.Protocol (1)
SourceRepository.cs (1)
181foreach (var group in providers.GroupBy(p => p.Value.ResourceType))
NuGet.Resolver (1)
PackageResolver.cs (1)
126foreach (var group in resolverPackages.GroupBy(e => e.Id, StringComparer.OrdinalIgnoreCase))
Roslyn.Diagnostics.Analyzers (4)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
769foreach (var grouping in groups)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
151foreach (var group in _outstanding.Values.GroupBy(v => (v.Type, v.PoolName)).OrderByDescending(g => g.Count()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
12public static void Deconstruct<TKey, TElement>(this IGrouping<TKey, TElement> grouping,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
206foreach (var group in accessors.GroupBy(node => node.SyntaxTree))
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
110foreach (var group in groups)
System.CommandLine.StaticCompletions (1)
shells\FishShellProvider.cs (1)
146foreach (var group in multiValueByArity)
System.Core (1)
System.Core.cs (1)
167[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.IGrouping<,>))]
System.Linq (38)
System\Linq\DebugView.cs (1)
120public IGrouping<TKey, TElement>[] Groupings => field ??= _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\GroupJoin.cs (3)
21/// An <see cref="IEnumerable{T}"/> that contains elements of type <see cref="IGrouping{TOuter, TInner}"/> 28public static IEnumerable<IGrouping<TOuter, TInner>> GroupJoin<TOuter, TInner, TKey>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 96private static IEnumerable<IGrouping<TOuter, TInner>> GroupJoinIterator<TOuter, TInner, TKey>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer)
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.AsyncEnumerable (48)
System\Linq\GroupBy.cs (28)
22/// An <see cref="IAsyncEnumerable{IGrouping}"/> where each <see cref="IGrouping{TKey, TElement}"/> 27public static IAsyncEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>( // satisfies the C# query-expression pattern 36source.IsKnownEmpty() ? Empty<IGrouping<TKey, TSource>>() : 39static async IAsyncEnumerable<IGrouping<TKey, TSource>> Impl( 45foreach (IGrouping<TKey, TSource> item in await ToLookupAsync(source, keySelector, comparer, cancellationToken)) 59/// An <see cref="IAsyncEnumerable{IGrouping}"/> where each <see cref="IGrouping{TKey, TElement}"/> 64public static IAsyncEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>( 73source.IsKnownEmpty() ? Empty<IGrouping<TKey, TSource>>() : 76static async IAsyncEnumerable<IGrouping<TKey, TSource>> Impl( 82foreach (IGrouping<TKey, TSource> item in await ToLookupAsync(source, keySelector, comparer, cancellationToken)) 96/// <typeparam name="TElement">The type of the elements in the <see cref="IGrouping{TKey, TElement}"/>.</typeparam> 99/// <param name="elementSelector">A function to map each source element to an element in an <see cref="IGrouping{TKey, TElement}"/>.</param> 102/// An <see cref="IAsyncEnumerable{IGrouping}"/> where each <see cref="IGrouping{TKey, TElement}"/> 108public static IAsyncEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>( // satisfies the C# query-expression pattern 119source.IsKnownEmpty() ? Empty<IGrouping<TKey, TElement>>() : 122static async IAsyncEnumerable<IGrouping<TKey, TElement>> Impl( 129foreach (IGrouping<TKey, TElement> item in await ToLookupAsync(source, keySelector, elementSelector, comparer, cancellationToken)) 143/// <typeparam name="TElement">The type of the elements in the <see cref="IGrouping{TKey, TElement}"/>.</typeparam> 146/// <param name="elementSelector">A function to map each source element to an element in an <see cref="IGrouping{TKey, TElement}"/>.</param> 149/// An <see cref="IAsyncEnumerable{IGrouping}"/> where each <see cref="IGrouping{TKey, TElement}"/> 155public static IAsyncEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>( 166source.IsKnownEmpty() ? Empty<IGrouping<TKey, TElement>>() : 169static async IAsyncEnumerable<IGrouping<TKey, TElement>> Impl( 176foreach (IGrouping<TKey, TElement> item in await ToLookupAsync(source, keySelector, elementSelector, comparer, cancellationToken)) 289/// <typeparam name="TElement">The type of the elements in each <see cref="IGrouping{TKey, TElement}"/>.</typeparam> 293/// <param name="elementSelector">A function to map each source element to an element in an <see cref="IGrouping{TKey, TElement}"/>.</param> 343/// <typeparam name="TElement">The type of the elements in each <see cref="IGrouping{TKey, TElement}"/>.</typeparam> 347/// <param name="elementSelector">A function to map each source element to an element in an <see cref="IGrouping{TKey, TElement}"/>.</param>
System\Linq\GroupJoin.cs (8)
24/// An <see cref="IAsyncEnumerable{T}"/> that contains elements of type <see cref="IGrouping{TOuter, TInner}"/> 31public static IAsyncEnumerable<IGrouping<TOuter, TInner>> GroupJoin<TOuter, TInner, TKey>( 44outer.IsKnownEmpty() ? Empty<IGrouping<TOuter, TInner>>() : 47static async IAsyncEnumerable<IGrouping<TOuter, TInner>> Impl( 80/// An <see cref="IAsyncEnumerable{T}"/> that contains elements of type <see cref="IGrouping{TOuter, TInner}"/> 87public static IAsyncEnumerable<IGrouping<TOuter, TInner>> GroupJoin<TOuter, TInner, TKey>( 100outer.IsKnownEmpty() ? Empty<IGrouping<TOuter, TInner>>() : 103static async IAsyncEnumerable<IGrouping<TOuter, TInner>> Impl(
System\Linq\ToLookupAsync.cs (12)
220private sealed class EmptyLookup<TKey, TElement> : ILookup<TKey, TElement>, IList<IGrouping<TKey, TElement>>, IReadOnlyCollection<IGrouping<TKey, TElement>> 230public IEnumerator<IGrouping<TKey, TElement>> GetEnumerator() => Enumerable.Empty<IGrouping<TKey, TElement>>().GetEnumerator(); 236public bool Contains(IGrouping<TKey, TElement> item) => false; 238public void CopyTo(IGrouping<TKey, TElement>[] array, int arrayIndex) 247public int IndexOf(IGrouping<TKey, TElement> item) => -1; 249public void Add(IGrouping<TKey, TElement> item) => throw new NotSupportedException(); 253public IGrouping<TKey, TElement> this[int index] 259public void Insert(int index, IGrouping<TKey, TElement> item) => throw new NotSupportedException(); 261public bool Remove(IGrouping<TKey, TElement> item) => throw new NotSupportedException(); 330public IEnumerator<IGrouping<TKey, TElement>> GetEnumerator()
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 (18)
System\Linq\EnumerableRewriter.cs (2)
129if (t.IsGenericType && t.GetGenericTypeDefinition().GetInterfaces().Contains(typeof(IGrouping<,>))) 130return typeof(IGrouping<,>).MakeGenericType(t.GetGenericArguments());
System\Linq\Queryable.cs (16)
421/// An <see cref="IQueryable{T}"/> that contains elements of type <see cref="IGrouping{TOuter, TInner}"/> 429public static IQueryable<IGrouping<TOuter, TInner>> GroupJoin<TOuter, TInner, TKey>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 436return outer.Provider.CreateQuery<IGrouping<TOuter, TInner>>( 439new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TOuter, TInner>>>(GroupJoin).Method, 1443public static IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 1448return source.Provider.CreateQuery<IGrouping<TKey, TSource>>( 1451new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IQueryable<IGrouping<TKey, TSource>>>(GroupBy).Method, 1456public static IQueryable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector) 1462return source.Provider.CreateQuery<IGrouping<TKey, TElement>>( 1465new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, IQueryable<IGrouping<TKey, TElement>>>(GroupBy).Method, 1470public static IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer) 1475return source.Provider.CreateQuery<IGrouping<TKey, TSource>>( 1478new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TKey, TSource>>>(GroupBy).Method, 1483public 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) 1489return source.Provider.CreateQuery<IGrouping<TKey, TElement>>( 1492new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TKey, TElement>>>(GroupBy).Method,
VBCSCompiler (1)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (1)
696foreach (var group in byDll)
vstest.console (1)
Internal\ConsoleLogger.cs (1)
705foreach (var sd in leafTestResultsPerSource)
vstest.console.arm64 (1)
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (1)
705foreach (var sd in leafTestResultsPerSource)