5 implementations of Key
Microsoft.CodeAnalysis (1)
Collections\Grouping.cs (1)
18public TKey Key { get; }
Microsoft.Data.Analysis (1)
GroupBy.cs (1)
89public TKey Key => _key;
System.Linq (1)
System\Linq\Grouping.cs (1)
397public TKey Key => _key;
System.Linq.Parallel (2)
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (2)
697TGroupKey IGrouping<TGroupKey, TElement>.Key 749TGroupKey IGrouping<TGroupKey, TElement>.Key
237 references to Key
AnalyzerRunner (2)
DiagnosticAnalyzerRunner.cs (2)
138Console.WriteLine($" {solution.GetProject(projectGroup.Key).Name}"); 297group => group.Key,
Aspire.Dashboard (1)
Otlp\Model\OtlpApplication.cs (1)
149.ToDictionary(grouping => grouping.Key, grouping => grouping.ToList());
Aspire.Dashboard.Components.Tests (1)
Controls\StructuredLogDetailsTests.cs (1)
72Assert.Fail($"Duplicate properties with key '{duplicate.Key}'.");
Aspire.Hosting (2)
Dcp\ApplicationExecutor.cs (1)
1274tasks.Add(CreateResourceExecutablesAsyncCore(group.Key, group, cancellationToken));
DistributedApplicationBuilder.cs (1)
409.Select(g => g.Key))
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
348Port = g.Key,
CodeGenerator (12)
src\Servers\Kestrel\shared\KnownHeaders.cs (12)
321case {byLength.Key}:{AppendSwitchSection(byLength.Key, byLength.OrderBy(h => h, KnownHeaderComparer.Instance).ToList())} 454if ({byFirstTerm.Key.Replace(firstTermVarExpression, firstTermVar)}) 973case {byLength.Key}: 1018case {byLength.Key}: 1049case {byLength.Key}: 1097case {byLength.Key}: 1324{AppendSwitch(loop.Headers.GroupBy(x => x.Name.Length).OrderBy(x => x.Key))} 1507Name = g.Key, 1508Header = headers.SingleOrDefault(knownHeader => string.Equals(knownHeader.Name, g.Key, StringComparison.OrdinalIgnoreCase)), 1528Name = g.Key, 1529Header = headers.SingleOrDefault(knownHeader => string.Equals(knownHeader.Name, g.Key, StringComparison.OrdinalIgnoreCase)),
IdeCoreBenchmarks (1)
NavigateToBenchmarks.cs (1)
228var service = grouping.Key;
InMemory.FunctionalTests (2)
Http2\Http2TestBase.cs (1)
985.ToDictionary(g => g.Key, g => new StringValues(g.Select(values => values.Value).ToArray()));
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
715.ToDictionary(g => g.Key, g => new StringValues(g.Select(values => values.Value).ToArray()));
installer.tasks (1)
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (1)
121Log.LogError($"Unable to find exactly one TPN for {miscount.Key}");
IOperationGenerator (2)
IOperationClassWriter.cs (2)
105var @namespace = grouping.Key ?? "Operations"; 317.ToDictionary(g => g.Key, g => g.Select(k => (entryName: k.entry, k.node)));
Microsoft.AspNetCore.Components.Tests (1)
Routing\RouteTableFactoryTests.cs (1)
1143.ToDictionary(group => group.Key, group => group.Select(g => g.Template).ToArray());
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\XmlComments\GrpcXmlCommentsDocumentFilter.cs (1)
33.Select(group => new KeyValuePair<string, ActionDescriptor>(group.Key, group.First()));
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
ApiDescriptionGroupCollectionProvider.cs (1)
79.Select(g => new ApiDescriptionGroup(g.Key, g.ToArray()))
Microsoft.AspNetCore.Mvc.Core (3)
Routing\AttributeRoute.cs (3)
122group.Key.RouteTemplate, 123group.Key.RouteName, 124group.Key.Order);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
CompilationFailedExceptionFactory.cs (2)
34var filePath = group.Key; 60var sourceFilePath = group.Key;
Microsoft.AspNetCore.Routing (19)
Matching\ILEmitTrieFactory.cs (19)
111Array.Sort(groups, static (a, b) => a.Key.CompareTo(b.Key)); 140il.Emit(OpCodes.Ldc_I4, group.Key); 146EmitTable(il, group.ToArray(), 0, group.Key, locals, labels, methods); 160il.Emit(OpCodes.Ldc_I4, groups[mid].Key); 336Array.Sort(groups, static (a, b) => unchecked((long)a.Key).CompareTo(unchecked((long)b.Key))); 357il.Emit(OpCodes.Ldc_I8, unchecked((long)group.Key)); 375il.Emit(OpCodes.Ldc_I8, unchecked((long)groups[mid].Key)); 455var disableBinarySearch = groups.Any(group => groups.Any(otherGroup => otherGroup.Key != group.Key && (otherGroup.Key | 0x20) == (group.Key | 0x20))); 461Array.Sort(groups, static (a, b) => (a.Key | 0x20).CompareTo(b.Key | 0x20)); 481var comparisonLocal = group.Key >= 'a' && group.Key <= 'z' 488il.Emit(OpCodes.Ldc_I4, unchecked((int)(uint)group.Key)); 507il.Emit(OpCodes.Ldc_I4, unchecked(((int)(uint)groups[mid].Key | 0x20)));
Microsoft.AspNetCore.Routing.Microbenchmarks (4)
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (2)
36.OrderBy(g => g.Key.Order) 37.ThenBy(g => g.Key.InboundPrecedence);
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (2)
43.OrderBy(g => g.Key.Order) 44.ThenBy(g => g.Key.InboundPrecedence);
Microsoft.AspNetCore.Routing.Tests (7)
Matching\DfaMatcherBuilderTest.cs (3)
3606.Select(g => new PolicyNodeEdge(g.Key, g.ToArray())) 3648.Select(g => new PolicyNodeEdge(g.Key, g.ToArray())) 3673.Select(g => new PolicyNodeEdge(g.Key, g.ToArray()))
Matching\RouteMatcherBuilder.cs (2)
36.OrderBy(g => g.Key.Order) 37.ThenBy(g => g.Key.InboundPrecedence);
Matching\TreeRouterMatcherBuilder.cs (2)
43.OrderBy(g => g.Key.Order) 44.ThenBy(g => g.Key.InboundPrecedence);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (9)
Http2\Http2HPackEncoderTests.cs (1)
664.ToDictionary(g => g.Key, g => new StringValues(g.Select(gg => gg.Value).ToArray()));
src\Servers\Kestrel\shared\KnownHeaders.cs (8)
321case {byLength.Key}:{AppendSwitchSection(byLength.Key, byLength.OrderBy(h => h, KnownHeaderComparer.Instance).ToList())} 454if ({byFirstTerm.Key.Replace(firstTermVarExpression, firstTermVar)}) 973case {byLength.Key}: 1018case {byLength.Key}: 1049case {byLength.Key}: 1097case {byLength.Key}: 1324{AppendSwitch(loop.Headers.GroupBy(x => x.Name.Length).OrderBy(x => x.Key))}
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
715.ToDictionary(g => g.Key, g => new StringValues(g.Select(values => values.Value).ToArray()));
Microsoft.Build.Tasks.CodeAnalysis (1)
GenerateMSBuildEditorConfig.cs (1)
89EncodeString(builder, group.Key);
Microsoft.Build.Tasks.Core (1)
GetSDKReferenceFiles.cs (1)
1034referencesByDirectory.TryAdd(group.Key, group.ToList());
Microsoft.Build.Tasks.UnitTests (1)
Hash_Tests.cs (1)
99.Select(g => g.Key);
Microsoft.Cci.Extensions (2)
Mappings\AttributesMapping.cs (2)
49if (!_attributes.TryGetValue(attrGroup.Key, out mapping)) 52_attributes.Add(attrGroup.Key, mapping);
Microsoft.CodeAnalysis (13)
CommandLine\ReportAnalyzerUtil.cs (2)
88consoleOutput.WriteLine(GetColumnEntry(executionTime, percentage, analyzerGroup.Key.FullName, culture)); 135consoleOutput.WriteLine(GetColumnEntry(executionTime, percentage, generatorGroup.Key.FullName, culture));
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
343var key = diagsByKey.Key;
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
1477builder.Add((analyzerAndActions.Key, actionsByKind)); 1491builder.Add((analyzerAndActions.Key, analyzerAndActions.ToImmutableArray())); 1834var analyzer = groupedActions.Key;
InternalUtilities\EnumerableExtensions.cs (1)
795dictionary.Add(grouping.Key, items);
MetadataReader\MetadataHelpers.cs (2)
807while (pair.Key.Length == namespaceNameLength) 829string childNamespaceName = ExtractSimpleNameOfChildNamespace(namespaceNameLength, pair.Key);
MetadataReader\PEModule.cs (4)
705int result = _nameComparer.Compare(left.Key, right.Key); 725result = string.CompareOrdinal(left.Key, right.Key);
Microsoft.CodeAnalysis.CodeStyle (5)
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (2)
48if (group.Key == true) 61var language = languageGroup.Key;
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
642var syntaxTree = group.Key;
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
795dictionary.Add(grouping.Key, items);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
15key = grouping.Key;
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
64var fieldDeclaration = fieldDeclarators.Key;
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
173var document = group.Key;
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
79.Where(group => group.Key is not null)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
279var memberDeclarations = GetDiagnosticsGroupedByMember(diagnostics, syntaxFacts, root).Select(g => g.Key); 324var containingMemberDeclaration = diagnosticsToFix.Key;
Microsoft.CodeAnalysis.CSharp (4)
BoundTree\LengthBasedStringSwitchData.cs (1)
194char character = group.Key;
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
269EmitFinallyFrame(g.Key, state),
Symbols\Metadata\PE\PENamespaceSymbol.cs (1)
288children.Add(PENamedTypeSymbol.Create(moduleSymbol, this, t, g.Key));
Symbols\Source\ConstantEvaluationHelpers.cs (1)
277SelectMany(static g => g.OrderByDescending((f1, f2) => g.Key.CompareSourceLocations(f1.ErrorLocation, f2.ErrorLocation))));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
535var syntaxTree = group.Key;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenAsyncLocalsTests.cs (1)
968Assert.Equal(1, spillFieldsByType.Single(x => TypeSymbol.Equals(x.Key, comp.GetSpecialType(SpecialType.System_Int32), TypeCompareKind.ConsiderEverything2)).Count());
Microsoft.CodeAnalysis.CSharp.Features (2)
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
277var semanticModel = compilation.GetSemanticModel(group.Key);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
535var syntaxTree = group.Key;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (1)
467var methodSyntax = annotations.Key;
DiagnosticTestUtilities.cs (1)
191var actualGroup = actualCodes.SingleOrDefault(x => x.Key == expectedGroup.Key);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeActions\CodeChangeProviderMetadataTests.cs (2)
68if (string.IsNullOrEmpty(namedGroup.Key)) 79failureMessage.AppendLine($"'{namedGroup.Key}' is used by the following providers: {providerNames}");
Microsoft.CodeAnalysis.Features (19)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
76var oldProject = grouping.Key;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (1)
137var tree = removeSuppressionFixesForTree.Key;
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
142.Select(changes => new TextSpan(changes.Key.Start, changes.Sum(change => change.NewText!.Length)));
EditAndContinue\DebuggingSession.cs (1)
403builder.Add(item.Key, [.. item]);
EditAndContinue\EditAndContinueService.cs (1)
188let project = solution.GetRequiredProject(projectDocumentIds.Key)
ExternalAccess\VSTypeScript\VSTypeScriptNavigateToSearchService.cs (1)
66await ProcessProjectAsync(group.Key).ConfigureAwait(false);
ExtractMethod\MethodExtractor.cs (1)
182var tokenMap = annotations.GroupBy(p => p.Item1, p => p.Item2).ToDictionary(g => g.Key, g => g.ToArray());
ExtractMethod\SelectionResult.cs (2)
211var tokenMap = pairs.GroupBy(p => p.Item1, p => p.Item2).ToDictionary(g => g.Key, g => g.ToArray()); 224var tokenMap = pairs.GroupBy(p => p.Item1, p => p.Item2).ToDictionary(g => g.Key, g => g.ToArray());
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
137var project = group.Key;
NavigateTo\NavigateToSearcher.cs (1)
382var searchService = grouping.Key;
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
190var allReferenceDocuments = getReferencesByDocument.Concat(setReferencesByDocument).Select(g => g.Key).Distinct();
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
203updatedSolution, group.Key, group, propertyToBackingField,
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (1)
48if (group.Key == true)
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
64var fieldDeclaration = fieldDeclarators.Key;
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
173var document = group.Key;
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
79.Where(group => group.Key is not null)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
279var memberDeclarations = GetDiagnosticsGroupedByMember(diagnostics, syntaxFacts, root).Select(g => g.Key); 324var containingMemberDeclaration = diagnosticsToFix.Key;
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\ProjectDependencyHelper.cs (1)
112.ToImmutableDictionary(g => g.Key, g => g.ToImmutableArray(), StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
395var priority = group.Key;
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (4)
119throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of parameters:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 124throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of returns:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 127var delegatingEntryPoint = CreateDelegatingEntryPoint(methodGroup.Key); 128var methodAttribute = new JsonRpcMethodAttribute(methodGroup.Key)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (1)
123genericMethodMap.Add(methodGroup.Key, languages.ToFrozenDictionary());
Microsoft.CodeAnalysis.UnitTests (10)
CachingLookupTests.cs (2)
123foreach (string k in look1.Select(g => g.Key)) 143foreach (string k in look2.Select(g => g.Key))
Collections\List\CollectionAsserts.cs (8)
85Assert.Equal(e.Where(kv => kv.Key != null).ToDictionary(g => g.Key!, g => g.Count()), a.Where(kv => kv.Key != null).ToDictionary(g => g.Key!, g => g.Count())); 104Assert.Equal(e.Where(kv => kv.Key != null).ToDictionary(g => g.Key!, g => g.Count()), a.Where(kv => kv.Key != null).ToDictionary(g => g.Key!, g => g.Count()));
Microsoft.CodeAnalysis.Workspaces (21)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (1)
210var docId = group.Key;
Diagnostics\Extensions.cs (1)
224AddDiagnosticsToResult(group.AsImmutable(), ref result, group.Key, additionalDocumentId: null,
Editing\SymbolEditor.cs (3)
135.ToImmutableDictionary(g => g.Key, g => ImmutableArray.CreateRange(g)); 469var docId = declGroup.Key; 484var doc = ChangedSolution.GetDocument(declGroup.Key);
FindSymbols\ReferenceLocationExtensions.cs (3)
21var projectGroups = documentGroups.GroupBy(g => g.Key.Project); 28var project = projectGroup.Key; 35var document = documentGroup.Key;
Log\StatisticResult.cs (1)
37var mode = values.GroupBy(i => i).OrderByDescending(g => g.Count()).First().Key;
ReassignedVariable\AbstractReassignedVariableService.cs (1)
200var otherSemanticModel = GetSemanticModel(group.Key);
Rename\ConflictEngine\ConflictResolver.Session.cs (3)
106.OrderBy(g => topologicallySortedProjects.IndexOf(g.Key)); 108_replacementTextValid = IsIdentifierValid_Worker(baseSolution, _replacementText, documentsGroupedByTopologicallySortedProjectId.Select(g => g.Key)); 149projectId: documentsByProject.Key,
Rename\ConflictEngine\MutableConflictResolution.cs (1)
154g => g.Key, g => g.ToImmutableArray());
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
337var syntaxFactsLanguageService = solution.Services.GetLanguageServices(documentsGroupedByLanguage.Key).GetService<ISyntaxFactsService>();
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
795dictionary.Add(grouping.Key, items);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IGroupingExtensions.cs (1)
15key = grouping.Key;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
208var semanticModel = compilation.GetSemanticModel(group.Key);
Workspace\Solution\SolutionCompilationState.cs (2)
806var projectId = g.Key; 1697newCompilationState = newCompilationState.RemoveDocumentsFromSingleProject<T>(documentIdsInProject.Key, [.. documentIdsInProject]);
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
283var groups = emitResult.Diagnostics.GroupBy(d => d.Id).Select(g => $"{g.Key}:{g.Count()}");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
795dictionary.Add(grouping.Key, items);
Microsoft.CommonLanguageServerProtocol.Framework.Package (5)
AbstractLanguageServer.cs (4)
119throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of parameters:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 124throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of returns:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 127var delegatingEntryPoint = CreateDelegatingEntryPoint(methodGroup.Key); 128var methodAttribute = new JsonRpcMethodAttribute(methodGroup.Key)
RequestExecutionQueue.cs (1)
123genericMethodMap.Add(methodGroup.Key, languages.ToFrozenDictionary());
Microsoft.Data.Analysis.Tests (4)
DataFrameGroupByTests.cs (4)
35var oddGroup = grouping.Where(gr => gr.Key == "odd").FirstOrDefault(); 39var evenGroup = grouping.Where(gr => gr.Key == "even").FirstOrDefault(); 58Assert.Equal("even", grouping.First().Key); 71var groupings = df.GroupBy<int>("Tens").Groupings.ToDictionary(g => g.Key, g => g.ToList());
Microsoft.DotNet.Build.Tasks.Installers (1)
src\GenerateJsonObjectString.cs (1)
56result.Append(group.Key);
Microsoft.DotNet.Build.Tasks.Packaging (11)
CreateTrimDependencyGroups.cs (1)
74.Select(dependencyGrouping => new TaskItemPackageDependencyGroup(dependencyGrouping.Key, dependencyGrouping))
GenerateNuSpec.cs (3)
311dependenciesByFramework.Key, 317dependenciesById.Key, 342referencesByFramework.Key,
GenerateRuntimeDependencies.cs (3)
94string targetRuntimeId = runtimeGroup.Key; 112string targetPackageId = targetPackageGroup.Key; 118string dependencyId = dependencyGroup.Key;
GetSupportedPackagesFromPackageReports.cs (1)
36var fx = fxRIDGrouping.Key;
PackageIndex.cs (1)
840writer.WritePropertyName(metaPackage.Key);
PromoteDependencies.cs (2)
48var refSets = dependencies.Where(d => d.Id != "_._").Where(d => d.IsReference).GroupBy(d => NuGetFramework.Parse(d.TargetFramework)).ToDictionary(g => g.Key, g => g.ToArray()); 53var libSets = dependencies.Where(d => !d.IsReference).GroupBy(d => NuGetFramework.Parse(d.TargetFramework)).ToDictionary(g => g.Key, g => g.ToArray());
Microsoft.DotNet.GenFacades (1)
GenPartialFacadeSourceGenerator.cs (1)
44.Select(y => y.Key);
Microsoft.DotNet.SharedFramework.Sdk (1)
src\GeneratePlatformManifestEntriesFromTemplate.cs (1)
32var files = Files.ToLookup(file => Path.GetFileName(file.ItemSpec)).ToDictionary(l => l.Key, l=> l.First());
Microsoft.DotNet.SignTool (1)
src\SignTool.cs (1)
84var certificate = osxFileGroup.Key;
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Modeler\ServiceClientModelFactory.cs (1)
127.Select(g => CreateMethodGroupModel(g.Key, g))
Microsoft.DotNet.VersionTools (1)
Automation\PullRequestCreator.cs (1)
195.Select(g => $"{g.Count()}{g.Key}")
Microsoft.Extensions.DependencyModel (3)
DependencyContextJsonReader.cs (2)
795ridGroup.Key, 807ridGroup.Key,
DependencyContextWriter.cs (1)
414WriteLibrary(libraryGroup.Key, libraryGroup.First(), jsonWriter);
Microsoft.Extensions.Http.Resilience.Tests (1)
Helpers\OptionsUtilities.cs (1)
56propertyGroup => propertyGroup.Key,
Microsoft.Extensions.Logging.AzureAppServices (2)
BlobLoggerProvider.cs (1)
63var key = eventGroup.Key;
FileLoggerProvider.cs (1)
45var fullName = GetFullName(group.Key);
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
77SyntaxTree syntaxTree = group.Key;
Microsoft.Gen.ContextualOptions (4)
ContextReceiver.cs (2)
47.SelectMany(declarations => declarations.Select(declaration => (symbol: compilation.GetSemanticModel(declarations.Key).GetDeclaredSymbol(declaration), declaration))) 52group => (INamedTypeSymbol)group.Key!, group => group.ToList(), comparer: SymbolEqualityComparer.Default);
ContextualOptionsGenerator.cs (2)
39.SelectMany(declarations => declarations.Select(declaration => (symbol: compilation.GetSemanticModel(declarations.Key).GetDeclaredSymbol(declaration), declaration))) 44group => (INamedTypeSymbol)group.Key!, group => group.ToList(), comparer: SymbolEqualityComparer.Default);
Microsoft.Gen.Logging (1)
Parsing\Parser.cs (1)
53SyntaxTree syntaxTree = group.Key;
Microsoft.Interop.ComInterfaceGenerator (1)
VtableIndexStubGenerator.cs (1)
438ContainingSyntaxContext containingSyntax = vtableMethods.Key.AddContainingSyntax(NativeTypeContainingSyntax);
Microsoft.ML.AutoML (7)
ColumnInference\ColumnGroupingInference.cs (4)
76: GetName(g.Key.ItemType.GetRawKind().ToDataKind(), g.Key.Purpose, result); 79result.Add(new GroupingColumn(name, g.Key.ItemType.GetRawKind().ToDataKind(), g.Key.Purpose, ranges));
ColumnInference\TextFileContents.cs (2)
117if (mostCommon.Key <= 1) { return false; } 119result = new ColumnSplitResult(true, options.Separators.First(), options.AllowQuoting, options.ReadMultilines, options.AllowSparse, mostCommon.Key);
Utils\UserInputValidationUtil.cs (1)
304return groups.FirstOrDefault(g => g.Count() > 1)?.Key;
Microsoft.ML.Fairlearn (2)
Metrics\FairlearnMetricCatalog.cs (2)
94.ToDictionary(group => group.Key, group => _context.Data.LoadFromEnumerable(group.Select(g => g.Item2))); 230groupMetric[kv.Key] = metrics;
Microsoft.ML.ResultProcessor (2)
ResultProcessor.cs (2)
174.ToDictionary(g => "/" + g.Key, g => string.Join(",", g)); 537GroupBy(kvp => kvp.Key, kvp => kvp.Value).ToDictionary(g => "/" + g.Key, g => string.Join(",", g));
Microsoft.ML.Tokenizers (1)
Model\WordPieceTokenizer.cs (1)
45SpecialTokensReverse = options.SpecialTokens is not null ? options.SpecialTokens.GroupBy(kvp => kvp.Value).ToDictionary(g => g.Key, g => g.First().Key) : null;
Microsoft.VisualStudio.LanguageServices (1)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
477var projectId = group.Key;
PrepareTests (2)
MinimizeUtil.cs (2)
200var destFileName = Path.GetRelativePath(group.Key, tuple.FilePath.RelativePath); 246var destFilePath = Path.GetRelativePath(group.Key, tuple.FilePath.RelativePath);
RunTests (2)
AssemblyScheduler.cs (2)
323.Select(group => new TypeInfo(GetName(group.Key), group.Key, group.Select(test => new TestMethodInfo(GetName(test), test, TimeSpan.Zero)).ToImmutableArray()))
System.Linq (1)
System\Linq\Lookup.cs (1)
291return GetGrouping(item.Key, create: false) is { } grouping && grouping == item;
System.Linq.Parallel (7)
System\Linq\Parallel\Utils\Lookup.cs (3)
113if (_comparer.Equals(grouping.Key, default)) 121Debug.Assert(!_dict.ContainsKey(grouping.Key)); 123_dict.Add(grouping.Key, grouping);
System\Linq\ParallelEnumerable.cs (4)
1414.Select<IGrouping<TKey, TSource>, TResult>(delegate (IGrouping<TKey, TSource> grouping) { return resultSelector(grouping.Key, grouping); }); 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); });
xunit.console (2)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (2)
401ridGroup.Key, 413ridGroup.Key,