371 references to ToDictionary
aspire (3)
Backchannel\ExtensionBackchannel.cs (2)
419var choicesByFormattedValue = choicesList.ToDictionary(choice => choiceFormatter(choice).RemoveSpectreFormatting(), choice => choice); 449var choicesByFormattedValue = choicesList.ToDictionary(choice => choiceFormatter(choice).RemoveSpectreFormatting(), choice => choice);
Projects\ProjectUpdater.cs (1)
793var mappingChangesBySource = changes.MappingChanges.ToDictionary(mc => mc.SourceKey, mc => mc);
Aspire.Dashboard (5)
Components\Controls\Chart\MetricTable.razor.cs (1)
129var traceValuesByPercentile = traces.ToDictionary(trace => trace.Percentile!.Value, trace => trace.Values[iTmp]);
Model\Assistant\AIHelpers.cs (2)
65.ToDictionary(a => a.Key, a => context.AddValue(MapOtelAttributeValue(a), id => $@"Duplicate of attribute ""{id.Key}"" for span {OtlpHelpers.ToShortenedId(id.SpanId)}", (s.SpanId, a.Key))), 349.ToDictionary(a => a.Key, a => context.AddValue(MapOtelAttributeValue(a), id => $@"Duplicate of attribute ""{id.Key}"" for log entry {id.InternalId}", (l.InternalId, a.Key))),
Model\Otlp\SpanWaterfallViewModel.cs (1)
131var groupedLogs = logs.GroupBy(l => l.SpanId).ToDictionary(l => l.Key, g => g.ToList());
Otlp\Model\OtlpResource.cs (1)
254.ToDictionary(grouping => grouping.Key, grouping => grouping.ToList());
Aspire.Hosting (4)
Health\ResourceHealthCheckService.cs (1)
156report = new HealthReport(registrationKeysToCheck.ToDictionary(k => k, k => new HealthReportEntry(HealthStatus.Unhealthy, "Error calling HealthCheckService.", TimeSpan.Zero, ex, data: null)), TimeSpan.Zero);
Orchestrator\RelationshipEvaluator.cs (1)
61var childToParentLookup = relationships.ToDictionary(x => x.Child, x => x.Parent);
Pipelines\DistributedApplicationPipeline.cs (1)
920.ToDictionary(g => g.Key, g => g.Select(kvp => kvp.Key).OrderBy(s => s, StringComparer.Ordinal).ToList());
UserSecrets\UserSecretsManagerFactory.cs (1)
168.ToDictionary(i => i.Key, i => i.Value);
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
94public IReadOnlyDictionary<string, string> Databases => _databases.ToDictionary(
Aspire.Hosting.Tests (2)
Pipelines\DistributedApplicationPipelineTests.cs (1)
233var stepTimes = executionOrder.ToDictionary(x => x.step, x => x.time);
SecretsStoreTests.cs (1)
80.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
BasicWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
34.ToDictionary(kvp => kvp.Key.Substring("link_".Length), kvp => (object)kvp.Value[0]);
BoundTreeGenerator (1)
BoundNodeClassWriter.cs (1)
41_typeMap = tree.Types.Where(t => t is not (EnumType or ValueType)).ToDictionary(n => n.Name, n => n.Base);
CSharpSyntaxGenerator (3)
AbstractFileWriter.cs (1)
35_parentMap = tree.Types.ToDictionary(n => n.Name, n => n.Base);
Grammar\GrammarGenerator.cs (1)
24var rules = types.ToDictionary(n => n.Name, _ => new List<Production>());
SignatureWriter.cs (1)
24_typeMap = tree.Types.ToDictionary(n => n.Name, n => n.Base);
dotnet (6)
Commands\Tool\Restore\ToolRestoreCommand.cs (1)
123.ToDictionary(pair => pair.Value.restoredCommandIdentifier, pair => pair.Value.toolCommand);
Commands\Workload\Install\WorkloadGarbageCollector.cs (1)
81_workloadSets = installedWorkloadSets.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.IsBaselineWorkloadSet ? GCAction.KeepWithoutPacks : GCAction.Collect);
Commands\Workload\Install\WorkloadManifestUpdater.cs (1)
244recorder.HistoryRecord.RollbackFileContents = manifestRollbacks.ToDictionary(kvp => kvp.Id.ToString(), kvp => kvp.ManifestWithBand.Version + "/" + kvp.ManifestWithBand.Band);
Commands\Workload\Search\WorkloadSearchVersionsCommand.cs (1)
124Reporter.WriteLine(JsonSerializer.Serialize(versions.Select(version => version.ToDictionary(_ => "workloadVersion", v => v))));
Commands\Workload\WorkloadHistoryRecorder.cs (1)
60ManifestVersions = resolver.GetInstalledManifests().ToDictionary(manifest => manifest.Id.ToString(), manifest => $"{manifest.Version}/{manifest.ManifestFeatureBand}"),
ToolPackage\ToolConfigurationDeserializer.cs (1)
70var ridSpecificPackages = dotNetCliTool.RuntimeIdentifierPackages?.ToDictionary(p => p.RuntimeIdentifier, p => new PackageIdentity(p.Id, null))
dotnet.Tests (3)
CommandTests\Run\RunFileTests.cs (1)
4247.ToDictionary(f => f.Name, f => File.ReadAllText(f.FullName));
TestAssetExtensions.cs (1)
17.ToDictionary(a => a.Key, a => a.Value);
VersionTest.cs (1)
23.ToDictionary(a => a.Key, a => a.Value);
dotnet-MsiInstallation.Tests (1)
Framework\VMControl.cs (1)
137var existingSnapshots = GetSnapshots().ToDictionary(s => s.id, s => s.name);
dotnet-watch (3)
Build\ProjectNodeMap.cs (1)
16graph.ProjectNodes.GroupBy(n => n.ProjectInstance.FullPath).ToDictionary(
CommandLine\CommandLineOptions.cs (1)
325var knownCommandsByName = Parser.Subcommands.ToDictionary(keySelector: c => c.Name, elementSelector: c => c);
HotReload\IncrementalMSBuildWorkspace.cs (1)
58var oldProjectIdsByPath = oldSolution.Projects.ToDictionary(keySelector: static p => (p.FilePath!, p.Name), elementSelector: static p => p.Id);
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
34.ToDictionary(kvp => kvp.Key.Substring("link_".Length), kvp => (object)kvp.Value[0]);
GetDocument.Insider (1)
Commands\GetDocumentCommand.cs (1)
68.ToDictionary(Path.GetFileNameWithoutExtension, path => new AssemblyInfo(path));
InMemory.FunctionalTests (4)
Http2\Http2TestBase.cs (2)
164internal Dictionary<string, object> ConnectionTags => _metricsTagsFeature.Tags.ToDictionary(t => t.Key, t => t.Value); 985.ToDictionary(g => g.Key, g => new StringValues(g.Select(values => values.Value).ToArray()));
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
95internal Dictionary<string, object> ConnectionTags => MultiplexedConnectionContext.Tags.ToDictionary(t => t.Key, t => t.Value); 734.ToDictionary(g => g.Key, g => new StringValues(g.Select(values => values.Value).ToArray()));
IOperationGenerator (2)
IOperationClassWriter.cs (2)
34_typeMap = _tree.Types.OfType<AbstractNode>().ToDictionary(t => t.Name, t => (AbstractNode?)t); 317.ToDictionary(g => g.Key, g => g.Select(k => (entryName: k.entry, k.node)));
Metrics (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Metrics.Legacy (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticAnalyzerRunner.cs (1)
70additionalEnabledDiagnostics.ToDictionary(s => s, s => ReportDiagnostic.Info));
DiagnosticVerifier.cs (1)
90additionalEnabledDiagnostics.ToDictionary(s => s, s => ReportDiagnostic.Info));
Microsoft.AspNetCore.App.Analyzers.Test (2)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (2)
175spans = tempSpans.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 223spans = dictionary.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableArray());
Microsoft.AspNetCore.Authentication.Test (5)
OpenIdConnect\OpenIdConnectTests.cs (2)
251.ToDictionary(pair => pair[0], pair => pair[1]); 282.ToDictionary(pair => pair[0], pair => pair[1]);
OpenIdConnect\TestSettings.cs (3)
63.ToDictionary(elem => elem.Attribute("name").Value, 101.ToDictionary(elem => elem.Attribute("name").Value, 141redirectUri.Query.TrimStart('?').Split('&').Select(part => part.Split('=')).ToDictionary(parts => parts[0], parts => parts[1]);
Microsoft.AspNetCore.BrowserTesting (1)
BrowserManagerConfiguration.cs (1)
134argsMap => argsMap.ToDictionary(kvp => kvp.Key, kvp => string.Join(", ", kvp.Value))),
Microsoft.AspNetCore.Components (1)
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (1)
537? parameterPolicyReferences.ToDictionary(kvp => kvp.Key, kvp => (IReadOnlyList<RoutePatternParameterPolicyReference>)kvp.Value.ToArray())
Microsoft.AspNetCore.Components.Endpoints (4)
Assets\ImportMapDefinition.cs (4)
40_imports = imports?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 41_integrity = integrity?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 42_scopes = scopes?.ToDictionary( 44kvp => kvp.Value.ToDictionary(scopeKvp => scopeKvp.Key, scopeKvp => scopeKvp.Value) as IReadOnlyDictionary<string, string>);
Microsoft.AspNetCore.Components.Tests (5)
PersistentState\ComponentStatePersistenceManagerTest.cs (2)
535State = state.ToDictionary(k => k.Key, v => v.Value); 559State = state.ToDictionary(k => k.Key, v => v.Value);
PersistentState\PersistentServicesRegistryTest.cs (1)
303State = state.ToDictionary(k => k.Key, v => v.Value);
PersistentStateValueProviderKeyResolverTests.cs (1)
418State = state.ToDictionary(k => k.Key, v => v.Value);
Routing\RouteTableFactoryTests.cs (1)
1143.ToDictionary(group => group.Key, group => group.Select(g => g.Template).ToArray());
Microsoft.AspNetCore.Components.Web.Tests (1)
Forms\EditFormTest.cs (1)
200.ToDictionary(f => f.AttributeName, f => f.AttributeValue);
Microsoft.AspNetCore.Components.WebAssembly.Tests (4)
Hosting\WebAssemblyHostConfigurationTest.cs (4)
96var section = configuration.GetSection("wheels").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value); 161var dict = configuration.GetSection("Mem1").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value); 167var dict2 = configuration.GetSection("Mem2").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value); 173var dict3 = configuration.GetSection("Mem3").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value);
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\Json\EnumNameHelpers.cs (2)
76var writeMapping = nameMappings.ToDictionary(m => m.Value, m => m); 80var removeEnumPrefixMapping = nameMappings.ToDictionary(m => m.OriginalName, m => m.OriginalName);
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
RouteValueDictionaryTests.cs (2)
87yield return new object[] { routeValues.ToDictionary(kvp => kvp.Key, kvp => kvp.Value) }; 106yield return new object[] { routeValues.ToDictionary(kvp => kvp.Key, kvp => kvp.Value) };
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Infrastructure\ServerFactory.cs (1)
104var relatedParts = relatedAssemblies.ToDictionary(
Microsoft.AspNetCore.Mvc.Core.Test (6)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (1)
441var binders = bindingContext.ModelMetadata.Properties.ToDictionary(
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (2)
597var binders = bindingContext.ModelMetadata.Properties.ToDictionary( 619var binders = bindingContext.ModelMetadata.Properties.ToDictionary(
ModelBinding\Binders\DictionaryModelBinderTest.cs (3)
288var stringDictionary = dictionary.ToDictionary(kvp => kvp.Key.ToString(CultureInfo.InvariantCulture), kvp => kvp.Value.ToString(CultureInfo.InvariantCulture)); 641var backingStore = dictionary.ToDictionary( 657var backingStore = dictionary.ToDictionary(
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
InputValidationTests.cs (1)
89.ToDictionary(
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
PrerenderComponentApplicationStoreTest.cs (2)
45expected.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToArray()), 46state.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToArray()));
ProtectedPrerenderComponentApplicationStateTest.cs (2)
53expectedState.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToArray()), 54restored.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToArray()));
Microsoft.AspNetCore.OpenApi (1)
Schemas\OpenApiJsonSchema.Helpers.cs (1)
286schema.Properties = props?.ToDictionary(p => p.Key, p => p.Value.Schema as IOpenApiSchema);
Microsoft.AspNetCore.OpenApi.Tests (1)
Extensions\OpenApiRouteHandlerBuilderExtensionTests.cs (1)
228.ToDictionary(
Microsoft.AspNetCore.OutputCaching (1)
Memory\MemoryOutputCacheStore.cs (1)
24internal Dictionary<string, HashSet<string>> TaggedEntries => _taggedEntries.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Select(t => t.Key).ToHashSet());
Microsoft.AspNetCore.Routing (1)
Patterns\RoutePatternFactory.cs (1)
537? parameterPolicyReferences.ToDictionary(kvp => kvp.Key, kvp => (IReadOnlyList<RoutePatternParameterPolicyReference>)kvp.Value.ToArray())
Microsoft.AspNetCore.Routing.Tests (1)
Template\TemplateBinderTests.cs (1)
1457.ToDictionary(pair => pair[0], pair => pair[1]);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\ConfigSectionClone.cs (1)
19Children = children.ToDictionary(child => child.Key, child => new ConfigSectionClone(child));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
ConnectionDispatcherTests.cs (1)
45var pairs = scopeObjects[0].ToDictionary(p => p.Key, p => p.Value);
Http2\Http2HPackEncoderTests.cs (1)
664.ToDictionary(g => g.Key, g => new StringValues(g.Select(gg => gg.Value).ToArray()));
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
95internal Dictionary<string, object> ConnectionTags => MultiplexedConnectionContext.Tags.ToDictionary(t => t.Key, t => t.Value); 734.ToDictionary(g => g.Key, g => new StringValues(g.Select(values => values.Value).ToArray()));
Microsoft.Build (7)
BackEnd\BuildManager\RequestedProjectState.cs (1)
51result.ItemFilters = ItemFilters.ToDictionary(
Evaluation\Evaluator.cs (1)
862var pluginSettings = item.Metadata.ToDictionary(m => m.Key, m => m.EscapedValue);
Graph\ProjectGraph.cs (2)
565var inDegree = graphNodes.ToDictionary(n => n, n => n.ReferencingProjects.Count); 614var targetLists = ProjectNodes.ToDictionary(node => node, node => ImmutableList<string>.Empty);
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
1262var e = new BuildCheckTracingEventArgs(rawTracingData.ToDictionary(
Logging\ParallelLogger\ParallelConsoleLogger.cs (1)
240WriteEnvironment(e.BuildEnvironment?.Where(kvp => EnvironmentUtilities.IsWellKnownEnvironmentDerivedProperty(kvp.Key)).ToDictionary(kvp => kvp.Key, kvp => kvp.Value));
Logging\ProfilerLogger.cs (1)
221var idTable = aggregatedLocations.ToDictionary(pair => pair.Key.Id,
Microsoft.Build.Engine.UnitTests (15)
BackEnd\NodePackets_Tests.cs (1)
189new TaskItemData("ItemSpec2", Enumerable.Range(1, 3).ToDictionary(i => i.ToString(), i => i.ToString() + "value"))
BackEnd\TranslationHelpers.cs (1)
206.ToDictionary(
BuildEventArgsSerialization_Tests.cs (1)
725new TaskItemData("ItemSpec2", Enumerable.Range(1,3).ToDictionary(i => i.ToString(), i => i.ToString() + "value"))
Graph\GraphLoadedFromSolution_tests.cs (2)
211var projectSpecificConfigurations = graph.ProjectNodes.ToDictionary( 213n => solutionConfigurations.ToDictionary(
Instance\ProjectInstance_Internal_Tests.cs (1)
1036template.Properties.ToDictionary(p => p.Key, p => p.Value.EvaluatedValue),
ProjectCache\ProjectCacheTests.cs (3)
1385referenceNumbers.ToDictionary(k => k, k => GraphCacheResponse.SuccessfulProxyTargetResult())); 1478referenceNumbers.ToDictionary(k => k, k => GraphCacheResponse.SuccessfulProxyTargetResult())); 1541referenceNumbers.ToDictionary(k => k, k => GraphCacheResponse.SuccessfulProxyTargetResult()));
SolutionFileBuilder.cs (4)
94Projects = graph.ProjectNodes.ToDictionary( 105var projectInfos = Projects.ToDictionary( 134ProjectConfigurations ??= projectInfos.ToDictionary( 136p => SolutionConfigurationPlatforms.ToDictionary(
Telemetry\Telemetry_Tests.cs (1)
255var tags = activity.Tags.ToDictionary(t => t.Key, t => t.Value);
TerminalLogger_Tests.cs (1)
344Properties = properties?.ToDictionary(k => k.Item1, v => v.Item2) ?? new Dictionary<string, string>(),
Microsoft.Build.Framework (1)
BuildCheck\BuildCheckTracingData.cs (1)
42.ToDictionary(g => g.Key, g => g.First().Value.TotalRuntime);
Microsoft.Build.Tasks.Core (1)
SystemState.cs (1)
607instanceLocalOutgoingFileStateCache = instanceLocalFileStateCache.ToDictionary(kvp => FileUtilities.MakeRelative(Path.GetDirectoryName(stateFile), kvp.Key), kvp => kvp.Value);
Microsoft.Build.Utilities.Core (1)
MuxLogger.cs (1)
865Traits.LogAllEnvironmentVariables ? _buildStartedEvent.BuildEnvironment : _buildStartedEvent.BuildEnvironment?.Where(kvp => EnvironmentUtilities.IsWellKnownEnvironmentDerivedProperty(kvp.Key)).ToDictionary(kvp => kvp.Key, kvp => kvp.Value));
Microsoft.CodeAnalysis.Analyzers (2)
MetaAnalyzers\SymbolIsBannedInAnalyzersAnalyzer.cs (1)
116return result.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableArray());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
SymbolIsBannedAnalyzer.cs (1)
129return result.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableArray());
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
470var mapping = capturedMethodTypeParameters.ToDictionary(tp => tp,
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
23return dictionary.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.AsImmutable());
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
222var namespaceDeclarationMap = namespaceDeclarations.ToDictionary( 258var namespaceDeclarationMap = namespaceDeclarations.ToDictionary(
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\AttributeTests.cs (1)
5765var named = attr.NamedArguments.ToDictionary(e => e.Key, e => e.Value);
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
222var namespaceDeclarationMap = namespaceDeclarations.ToDictionary( 258var namespaceDeclarationMap = namespaceDeclarations.ToDictionary(
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
315var named = attr.NamedArguments.ToDictionary(e => e.Key, e => e.Value);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
23return dictionary.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.AsImmutable());
Microsoft.CodeAnalysis.EditorFeatures (4)
CommentSelection\ToggleLineCommentCommandHandler.cs (1)
84var linesInSelections = selectedSpans.ToDictionary(
Logging\FunctionIdOptions.cs (1)
48var functionIdOptions = GetFunctionIds().ToDictionary(id => id, id => globalOptions.GetOption(GetOption(id)));
Shared\Extensions\HostWorkspaceServicesExtensions.cs (2)
79.ToDictionary(lz => lz.Language, lz => lz.DefaultContentType)!; 83return hostWorkspaceServices.SupportedLanguages.ToDictionary(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\EditorTestWorkspace.cs (1)
486mappedMarkupSpans = tempMappedMarkupSpans.ToDictionary(
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
725var expectedMap = expected.ToDictionary(entry => (entry.diagnosticId, entry.optionName), entry => entry.optionValue);
EditorConfigSettings\Data\CodeStyleSettingsTest.cs (1)
105=> _dictionary = options?.ToDictionary(x => x.Item1, x => x.Item2) ?? [];
Microsoft.CodeAnalysis.Features (9)
CodeFixes\Service\CodeFixService.cs (1)
1038_fixerToIndex = allFixers.Select((fixer, index) => (fixer, index)).ToDictionary(t => t.fixer, t => t.index);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
1653map.ToDictionary(keySelector: entry => entry.Value, elementSelector: entry => entry.Key),
ExtractMethod\AbstractSyntaxTriviaService.cs (1)
41.ToDictionary(location => location, _ => new SyntaxAnnotation());
ExtractMethod\AbstractSyntaxTriviaService.Result.cs (2)
108.ToDictionary( 133.ToDictionary(
ExtractMethod\SelectionResult.cs (2)
245var tokenMap = pairs.GroupBy(p => p.Item1, p => p.Item2).ToDictionary(g => g.Key, g => g.ToArray()); 258var tokenMap = pairs.GroupBy(p => p.Item1, p => p.Item2).ToDictionary(g => g.Key, g => g.ToArray());
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
470var mapping = capturedMethodTypeParameters.ToDictionary(tp => tp,
UnusedReferences\UnusedReferencesRemover.cs (1)
71.ToDictionary(group => group.Key, group => group.ToImmutableArray());
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueTestAnalyzerConfigOptions.cs (1)
17=> _options = options.ToDictionary(e => e.key, e => e.value);
Microsoft.CodeAnalysis.Features.UnitTests (1)
FindUsages\DefinitionItemFactoryTests.cs (1)
95var expressionMap = (symbols ?? []).ToDictionary(s => SymbolKey.Create(s.symbol).ToString(), s => $"{nameof(SymbolKey)}.{nameof(SymbolKey.CreateString)}({s.localName})");
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Handler\MapCode\MapCodeHandler.cs (1)
76Changes = uriToEditsMap.ToDictionary(kvp => ProtocolConversions.GetDocumentFilePathFromUri(kvp.Key.GetRequiredParsedUri()), kvp => kvp.Value)
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (1)
100var documentToPreviousDiagnosticParams = documentToPreviousParams.ToDictionary(kvp => new ProjectOrDocumentId(kvp.Key.Id), kvp => kvp.Value);
Protocol\SumType.cs (1)
900=> dictionary.ToDictionary(kvp => kvp.Key, kvp => (object)kvp.Value);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\TestSyntaxTreeOptionsProvider.cs (2)
23_options = options.ToDictionary( 58_isGenerated = isGenerated.ToDictionary(
MarkedSource\MarkupTestFile.cs (2)
177spans = tempSpans.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 227spans = dictionary.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableAndFree());
Mocks\TestSourceReferenceResolver.cs (3)
22return new TestSourceReferenceResolver(sources.ToDictionary(p => p.Key, p => (object)p.Value)); 27return new TestSourceReferenceResolver(sources.ToDictionary(p => p.Key, p => p.Value)); 32return new TestSourceReferenceResolver(sources.ToDictionary(p => p.Key, p => (object)p.Value));
TestableFileSystem.cs (1)
66var map = files.ToDictionary(
Microsoft.CodeAnalysis.UnitTests (4)
Collections\List\CollectionAsserts.cs (4)
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 (2)
CodeCleanup\AbstractCodeCleanerService.cs (1)
595var tokenMap = map.ToDictionary(p => p.Key, p => p.Value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Microsoft.Data.Analysis (1)
DataFrame.Join.cs (1)
235newOccurrences = newOccurrences.ToDictionary(kvp => retainedIndicesReverseMapping[kvp.Key], kvp => kvp.Value);
Microsoft.Data.Analysis.Tests (1)
DataFrameGroupByTests.cs (1)
71var groupings = df.GroupBy<int>("Tens").Groupings.ToDictionary(g => g.Key, g => g.ToList());
Microsoft.DotNet.Baselines.Tasks (1)
PRCreator.cs (1)
146.ToDictionary(
Microsoft.DotNet.Build.Manifest (1)
XElementParsingExtensions.cs (1)
26return element.Attributes().ToDictionary(a => a.Name.LocalName, a => a.Value);
Microsoft.DotNet.Build.Tasks.Installers (1)
src\CreateRpmPackage.cs (1)
121Dictionary<string, string> filePathToKind = RawPayloadFileKinds.Select(k => k.ItemSpec.Split(':')).ToDictionary(k => k[0], k => k[1].Trim());
Microsoft.DotNet.Build.Tasks.Packaging (4)
NuGetPack.cs (1)
278Dictionary<string, bool> pathHasMatches = EffectiveLibPackageExcludes.ToDictionary(
PromoteDependencies.cs (2)
44var refSets = dependencies.Where(d => d.Id != "_._").Where(d => d.IsReference).GroupBy(d => NuGetFramework.Parse(d.TargetFramework)).ToDictionary(g => g.Key, g => g.ToArray()); 49var libSets = dependencies.Where(d => !d.IsReference).GroupBy(d => NuGetFramework.Parse(d.TargetFramework)).ToDictionary(g => g.Key, g => g.ToArray());
ValidateFrameworkPackage.cs (1)
42.ToDictionary(a => Path.GetFileNameWithoutExtension(a.PackagePath), a => a);
Microsoft.DotNet.Cli.Utils (1)
TelemetryEventEntry.cs (1)
110var appliedProperties = Properties?.ToDictionary(p => p.Key, p => (string?)func(p.Value));
Microsoft.DotNet.Helix.Client (1)
generated-code\HelixApi.cs (1)
279Headers = request.Headers.ToDictionary(h => h.Name, h => h.Value);
Microsoft.DotNet.Helix.JobSender (1)
JobDefinition.cs (1)
181(await Task.WhenAll(CorrelationPayloads.Select(async p => (uri: await p.Key.UploadAsync(storageContainer, log, cancellationToken), destination: p.Value)))).ToDictionary(x => x.uri, x => x.destination);
Microsoft.DotNet.MSBuildSdkResolver (2)
WorkloadSet.cs (2)
25ManifestVersions = manifests.ToDictionary(m => new ManifestId(m.Id), m => (new ManifestVersion(m.Version), new SdkFeatureBand(m.ManifestFeatureBand))) 58}).ToDictionary(t => t.id, t => (t.manifestVersion, t.manifestFeatureBand));
Microsoft.DotNet.PackageInstall.Tests (1)
TestToolBuilder.cs (1)
208.ToDictionary(l => l.Split(':')[0].Trim(), l => l.Split(':', count: 2)[1].Trim());
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.Tests (1)
SignToolTests.cs (1)
1763var tempFileExtensionSignInfo = s_fileExtensionSignInfo.Where(s => s.Key != ".symbols.nupkg").ToDictionary(e => e.Key, e => e.Value);
Microsoft.DotNet.TemplateLocator (2)
WorkloadSet.cs (2)
25ManifestVersions = manifests.ToDictionary(m => new ManifestId(m.Id), m => (new ManifestVersion(m.Version), new SdkFeatureBand(m.ManifestFeatureBand))) 58}).ToDictionary(t => t.id, t => (t.manifestVersion, t.manifestFeatureBand));
Microsoft.DotNet.XliffTasks (1)
Tasks\TransformTemplates.cs (1)
93Dictionary<string, string> defaultTranslation = document.Nodes.ToDictionary(node => node.Id, node => node.Source);
Microsoft.Extensions.AI.Abstractions.Tests (5)
Contents\FunctionCallContentTests.cs (4)
164""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value); 185""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value); 204""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value)); 240""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value));
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
1172private readonly IReadOnlyDictionary<TKey, TValue> _dictionary = values.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Microsoft.Extensions.AI.Integration.Tests (1)
VerbatimMultiPartHttpHandler.cs (1)
194.ToDictionary(g => g.Key, g => g.Count());
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
188var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Image\OpenTelemetryImageGeneratorTests.cs (1)
115var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (1)
126var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Microsoft.Extensions.Diagnostics.Testing.Tests (2)
Logging\FakeLoggerTests.cs (2)
86var ss = logger.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 102ss = logger.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value);
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\Internal\LogRecordExtensions.cs (1)
19return logRecord.StructuredState.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Microsoft.Extensions.Http.Resilience.Tests (1)
Helpers\OptionsUtilities.cs (1)
55.ToDictionary(
Microsoft.Extensions.Resilience.Tests (1)
Resilience\ResilienceMetricsEnricherTests.cs (1)
26private IReadOnlyDictionary<string, object?> Tags => _tags.ToDictionary(v => v.Key, v => v.Value);
Microsoft.Gen.Logging.Generated.Tests (4)
LogPropertiesTests.cs (4)
45var ss = _logger.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 176var ss = collector.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 194ss = collector.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 604.ToDictionary(p => p.Key, p => p.Value);
Microsoft.Interop.ComInterfaceGenerator (1)
ComMethodContext.cs (1)
177var ifaceToDeclaredMethodsMap = ifaceAndDeclaredMethods.ToDictionary(static pair => pair.Item1, static pair => pair.Item2);
Microsoft.Maui (1)
Handlers\HybridWebView\HybridWebViewQueryStringHelper.cs (1)
42 .ToDictionary(p => p[0], p => Uri.UnescapeDataString(p[1]));
Microsoft.ML.AutoML (16)
SweepableEstimator\MultiModelPipeline.cs (1)
114var estimators = _estimators.ToDictionary(x => x.Key, x => x.Value);
SweepableEstimator\SweepablePipeline.cs (2)
112.ToDictionary((se) => se.ToString(), (se) => _estimators[((StringEntity)se).Value]); 174var estimators = _estimators.ToDictionary(x => x.Key, x => x.Value);
TrainerExtensions\TrainerExtensionCatalog.cs (1)
50_trainerNamesToExtensionTypes.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
TrainerExtensions\TrainerExtensionUtil.cs (4)
173var boosterProps = boosterParams.ToDictionary(p => p.Name, p => (object)p.ProcessedValue()); 176props = parentArgParams.ToDictionary(p => p.Name, p => (object)p.ProcessedValue()); 196.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 283.ToDictionary(v => Enum.GetName(fi.FieldType, v), v => v);
Tuner\AutoZeroTuner.cs (1)
35}).ToDictionary(kv => kv.schema, kv => kv.pipelineString);
Tuner\EciCfoTuner.cs (1)
32_tuners = pipelineSchemas.ToDictionary(schema => schema, schema =>
Tuner\PipelineProposer.cs (6)
87_learnerInitialCost = _pipelineSchemas.ToDictionary(kv => kv, kv => GetEstimatedCostForPipeline(kv, _sweepablePipeline)); 89_eci = _pipelineSchemas.ToDictionary(kv => kv, kv => GetEstimatedCostForPipeline(kv, _sweepablePipeline)); 151_k1 = _pipelineSchemas.ToDictionary(id => id, id => duration * _learnerInitialCost[id] / _learnerInitialCost[schema]); 152_k2 = _k1.ToDictionary(kv => kv.Key, kv => kv.Value); 153_e1 = _pipelineSchemas.ToDictionary(id => id, id => loss); 154_e2 = _pipelineSchemas.ToDictionary(id => id, id => loss + 0.05 * Math.Abs(loss));
Microsoft.ML.AutoML.Tests (1)
Utils\TaskAgnosticIterationResult.cs (1)
83return propertiesToReport.ToDictionary(p => p.Name, p => (double)metric.GetType().GetProperty(p.Name).GetValue(metric));
Microsoft.ML.CodeGenerator (1)
Utils.cs (1)
82return sampleData.Cast<DictionaryEntry>().ToDictionary(k => (string)k.Key, v => (string)v.Value);
Microsoft.ML.Data (1)
DataView\InternalSchemaDefinition.cs (1)
77: metadataInfos.ToDictionary(entry => entry.Key, entry => entry.Value);
Microsoft.ML.Fairlearn (2)
Metrics\FairlearnMetricCatalog.cs (2)
94.ToDictionary(group => group.Key, group => _context.Data.LoadFromEnumerable(group.Select(g => g.Item2))); 97.ToDictionary(kv => kv.Key, kv => kv.Item2);
Microsoft.ML.GenAI.Core (2)
Extension\ModuleExtension.cs (2)
152var childrenDeviceMap = deviceMap.Where(x => x.Key.StartsWith($"{key}.")).ToDictionary(x => x.Key.Substring($"{key}.".Length), x => x.Value); 180var remainingLayerSizeMap = layerSizeMap.Where(x => !deviceMap.ContainsKey(x.Key)).ToDictionary(x => x.Key, x => x.Value);
Microsoft.ML.GenAI.Phi.Tests (1)
Phi3Tests.cs (1)
107var sizeInMB = size.ToDictionary(x => x.Key, x => x.Value / 1024 / 1024);
Microsoft.ML.Predictor.Tests (2)
CompareBaselines.cs (2)
70.ToDictionary(s => Path.GetFileName(s).ToLowerInvariant(), s => false); 93.ToDictionary(s => Path.GetFileName(s).ToLowerInvariant(), s => false);
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.SearchSpace (3)
SearchSpace.cs (3)
39_options = options.ToDictionary(kv => kv.Key, kv => kv.Value); 45_options = options.ToDictionary(kv => kv.Key, kv => kv.Value); 176return fieldOptions.Concat(propertyOptions).ToDictionary(kv => kv.Key, kv => kv.Value);
Microsoft.ML.TimeSeries (1)
RootCauseAnalyzer.cs (1)
130return new Dictionary<string, object>(keyList.Select(dim => new KeyValuePair<string, object>(dim, dimension[dim])).ToDictionary(kvp => kvp.Key, kvp => kvp.Value));
Microsoft.ML.Tokenizers (11)
Model\BPETokenizer.cs (3)
355_specialTokens = specialTokens.ToDictionary(kvp => new StringSpanOrdinalKey(kvp.Key), kvp => (kvp.Value, kvp.Key)); 356_specialTokensReverse = specialTokens.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 766public IReadOnlyDictionary<string, int> Vocabulary => _vocabOriginal ??= new ReadOnlyDictionary<string, int>(_vocab.ToDictionary(kvp => kvp.Key.Data!, kvp => kvp.Value));
Model\CodeGenTokenizer.cs (4)
128_vocabReverse = _vocab.ToDictionary(kvp => kvp.Value.Id, kvp => kvp.Value.Token); 137_specialTokens = specialTokens.ToDictionary(kvp => new StringSpanOrdinalKey(kvp.Key), kvp => (kvp.Value, kvp.Key)); 138_specialTokensReverse = specialTokens.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 269var vocab = new ReadOnlyDictionary<string, int>(_vocab.ToDictionary(kvp => kvp.Value.Token, kvp => kvp.Value.Id));
Model\TiktokenTokenizer.cs (1)
991internal IReadOnlyDictionary<string, int> Vocabulary => _vocabOriginal ??= _vocab.ToDictionary(kvp => kvp.Key.Data!, kvp => kvp.Value.Id);
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;
Utils\ByteToUnicodeEncoding.cs (2)
22.ToDictionary(b => (char)b, b => (char)b); 36UnicodeToByte = ByteToUnicode.ToDictionary(kv => kv.Value, kv => kv.Key);
Microsoft.ML.Tokenizers.Tests (8)
BpeTests.cs (2)
316var reverseVocabulary = bpe.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 814private static IReadOnlyDictionary<int, string> _vocabReverse = _deepSeekR1Tokenizer.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
CodeGenTests.cs (2)
498var reverseVocab = codeGenTokenizer.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 499var reverseSpecialTokens = codeGenTokenizer.SpecialTokens?.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
EnglishRobertaTests.cs (1)
287var reverseVocab = robertaModel.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
LlamaTests.cs (1)
253var reverseVocabulary = bpe.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
src\Microsoft.ML.Tokenizers\Utils\ByteToUnicodeEncoding.cs (2)
22.ToDictionary(b => (char)b, b => (char)b); 36UnicodeToByte = ByteToUnicode.ToDictionary(kv => kv.Value, kv => kv.Key);
Microsoft.NET.Build.Tasks (7)
DependencyContextBuilder.cs (1)
353var libraries = runtimeLibraries.ToDictionary(lib => lib.Library.Name, lib => lib);
GetPackagesToPrune.cs (3)
240.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 254return overrides.ToDictionary(o => o.id, o => o.version); 268?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
ResolvePackageDependencies.cs (1)
143_targetNameToAliasMap = LockFile.Targets.ToDictionary(t => t.Name, t =>
WorkloadSet.cs (2)
25ManifestVersions = manifests.ToDictionary(m => new ManifestId(m.Id), m => (new ManifestVersion(m.Version), new SdkFeatureBand(m.ManifestFeatureBand))) 58}).ToDictionary(t => t.id, t => (t.manifestVersion, t.manifestFeatureBand));
Microsoft.NET.Build.Tests (3)
GivenThatWeWantToBuildAnAppWithSharedProject.cs (1)
34.ToDictionary(g => g.Key, g => g.Select(i => (fullPath: i.fullPath, link: i.link)).ToList());
GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs (2)
48.ToDictionary(g => g.Key, g => g.Select(i => (fullPath: i.fullPath, link: i.link)).ToList()); 84var expectedItemMetadata = expectedItems.ToDictionary(
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (18)
BootJsonData.cs (17)
429result[kvp.Key] = kvp.Value.ToDictionary(a => a.name, a => a.integrity); 436return vfsAssets?.ToDictionary(a => a.virtualPath, a => new ResourceHashesByNameDictionary 445jsModuleWorker = assets.jsModuleWorker?.ToDictionary(a => a.name, a => (string)null), 446jsModuleDiagnostics = assets.jsModuleDiagnostics?.ToDictionary(a => a.name, a => (string)null), 447jsModuleNative = assets.jsModuleNative?.ToDictionary(a => a.name, a => (string)null), 448jsModuleRuntime = assets.jsModuleRuntime?.ToDictionary(a => a.name, a => (string)null), 449wasmNative = assets.wasmNative?.ToDictionary(a => a.name, a => a.integrity), 450wasmSymbols = assets.wasmSymbols?.ToDictionary(a => a.name, a => (string)null), 451icu = assets.icu?.ToDictionary(a => a.name, a => a.integrity), 452coreAssembly = assets.coreAssembly?.ToDictionary(a => a.name, a => a.integrity), 453assembly = assets.assembly?.ToDictionary(a => a.name, a => a.integrity), 454corePdb = assets.corePdb?.ToDictionary(a => a.name, a => a.integrity), 455pdb = assets.pdb?.ToDictionary(a => a.name, a => a.integrity), 457lazyAssembly = assets.lazyAssembly?.ToDictionary(a => a.name, a => a.integrity), 458libraryInitializers = assets.libraryInitializers?.ToDictionary(a => a.name, a => (string)null), 459modulesAfterConfigLoaded = assets.modulesAfterConfigLoaded?.ToDictionary(a => a.name, a => (string)null), 460modulesAfterRuntimeReady = assets.modulesAfterRuntimeReady?.ToDictionary(a => a.name, a => (string)null),
ServiceWorkerAssert.cs (1)
34var assetsManifestHashesByUrl = (IReadOnlyDictionary<string, string>)assetsManifest.assets.ToDictionary(x => x.url, x => x.hash);
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
UpgradeLegacyWasmStaticWebAssets.cs (1)
26.ToDictionary(g => g.Key, g => g.ToArray());
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (26)
BootJsonData.cs (17)
429result[kvp.Key] = kvp.Value.ToDictionary(a => a.name, a => a.integrity); 436return vfsAssets?.ToDictionary(a => a.virtualPath, a => new ResourceHashesByNameDictionary 445jsModuleWorker = assets.jsModuleWorker?.ToDictionary(a => a.name, a => (string)null), 446jsModuleDiagnostics = assets.jsModuleDiagnostics?.ToDictionary(a => a.name, a => (string)null), 447jsModuleNative = assets.jsModuleNative?.ToDictionary(a => a.name, a => (string)null), 448jsModuleRuntime = assets.jsModuleRuntime?.ToDictionary(a => a.name, a => (string)null), 449wasmNative = assets.wasmNative?.ToDictionary(a => a.name, a => a.integrity), 450wasmSymbols = assets.wasmSymbols?.ToDictionary(a => a.name, a => (string)null), 451icu = assets.icu?.ToDictionary(a => a.name, a => a.integrity), 452coreAssembly = assets.coreAssembly?.ToDictionary(a => a.name, a => a.integrity), 453assembly = assets.assembly?.ToDictionary(a => a.name, a => a.integrity), 454corePdb = assets.corePdb?.ToDictionary(a => a.name, a => a.integrity), 455pdb = assets.pdb?.ToDictionary(a => a.name, a => a.integrity), 457lazyAssembly = assets.lazyAssembly?.ToDictionary(a => a.name, a => a.integrity), 458libraryInitializers = assets.libraryInitializers?.ToDictionary(a => a.name, a => (string)null), 459modulesAfterConfigLoaded = assets.modulesAfterConfigLoaded?.ToDictionary(a => a.name, a => (string)null), 460modulesAfterRuntimeReady = assets.modulesAfterRuntimeReady?.ToDictionary(a => a.name, a => (string)null),
ServiceWorkerAssert.cs (1)
34var assetsManifestHashesByUrl = (IReadOnlyDictionary<string, string>)assetsManifest.assets.ToDictionary(x => x.url, x => x.hash);
StaticWebAssetsBaselineComparer.cs (7)
50.ToDictionary(a => a.Key, a => a.Order().ToArray()); 54.ToDictionary(a => a.Key, a => a.Order().ToArray()); 65.ToDictionary(a => a.Key, a => a.Order().ToArray()); 67var actualAssetsByIdentity = actual.Assets.GroupBy(a => a.Identity).ToDictionary(a => a.Key, a => a.Order().ToArray()); 86.ToDictionary(a => a.Key, a => a.Order().ToArray()); 92.ToDictionary(a => a.Key, a => a.Order().ToArray()); 108.ToDictionary(a => a.Key, a => a.Order().ToArray());
StaticWebAssetsBaselineFactory.cs (1)
79var endpointsByAssetFile = manifest.Endpoints.GroupBy(e => e.AssetFile).ToDictionary(g => g.Key, g => g.ToArray());
Microsoft.NET.Sdk.StaticWebAssets.Tasks (4)
FingerprintPatternMatcher.cs (1)
24.ToDictionary(
MergeStaticWebAssets.cs (1)
35.ToDictionary(g => g.Key, g => g.ToList());
UpdateStaticWebAssetEndpoints.cs (2)
46.ToDictionary(e => e.Key, e => e.ToHashSet()); 49.ToDictionary(e => e.Key, e => e.ToHashSet());
Microsoft.NET.Sdk.StaticWebAssets.Tests (12)
StaticWebAssetEndpointsIntegrationTest.cs (1)
523var endpointsByAssetFile = endpoints.Endpoints.GroupBy(e => e.AssetFile).ToDictionary(g => g.Key, g => g.ToArray());
StaticWebAssets\DiscoverStaticWebAssetsTest.cs (2)
890cache.CachedAssets = cached.ToDictionary(c => c, c => new StaticWebAsset { Identity = c }); 892return (cache, newAssets.Concat(appendCachedToInputHashes ? cached : []).ToDictionary(c => c, c => new TaskItem(c) as ITaskItem));
StaticWebAssets\GenerateStaticWebAssetsDevelopmentManifestTest.cs (1)
712Children = children.Length == 0 ? null : children.ToDictionary(pair => pair.key, pair => pair.node)
StaticWebAssetsBaselineComparer.cs (7)
50.ToDictionary(a => a.Key, a => a.Order().ToArray()); 54.ToDictionary(a => a.Key, a => a.Order().ToArray()); 65.ToDictionary(a => a.Key, a => a.Order().ToArray()); 67var actualAssetsByIdentity = actual.Assets.GroupBy(a => a.Identity).ToDictionary(a => a.Key, a => a.Order().ToArray()); 86.ToDictionary(a => a.Key, a => a.Order().ToArray()); 92.ToDictionary(a => a.Key, a => a.Order().ToArray()); 108.ToDictionary(a => a.Key, a => a.Order().ToArray());
StaticWebAssetsBaselineFactory.cs (1)
79var endpointsByAssetFile = manifest.Endpoints.GroupBy(e => e.AssetFile).ToDictionary(g => g.Key, g => g.ToArray());
Microsoft.NET.Sdk.WorkloadManifestReader (2)
WorkloadSet.cs (2)
25ManifestVersions = manifests.ToDictionary(m => new ManifestId(m.Id), m => (new ManifestVersion(m.Version), new SdkFeatureBand(m.ManifestFeatureBand))) 58}).ToDictionary(t => t.id, t => (t.manifestVersion, t.manifestFeatureBand));
Microsoft.TemplateEngine.Cli (4)
Alias\AliasModel.cs (1)
17CommandAliases = new Dictionary<string, IReadOnlyList<string>>(commandAliases.ToDictionary(x => x.Key, x => x.Value), StringComparer.OrdinalIgnoreCase);
Commands\create\TemplateCommand.cs (1)
310.ToDictionary(p => p.Parameter, p => p.Errors);
Commands\create\TemplateCommandArgs.cs (1)
77.ToDictionary(kvp => kvp.Key, kvp => kvp.Item2);
TemplateResolution\TemplateMatchInfoExtensions.cs (1)
16.ToDictionary(x => x.Name, x => x.Value);
Microsoft.TemplateEngine.Cli.UnitTests (6)
AliasAssignmentTests.cs (6)
58var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 76var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 94var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 111var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 126var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 200var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r);
Microsoft.VisualStudio.LanguageServices (5)
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
127return map.ToDictionary(kv => kv.Key, kv => (IEnumerable<DiagnosticDescriptor>)kv.Value);
EditorConfigSettings\Whitespace\ViewModel\IndentationSizeViewModel.cs (1)
109return EnumerateOptions().ToDictionary(x => x.description, x => x.value);
EditorConfigSettings\Whitespace\ViewModel\NewLineViewModel.cs (1)
87return EnumerateOptions().ToDictionary(x => x.description, x => x.value);
EditorConfigSettings\Whitespace\ViewModel\OperatorPlacementWhenWrappingViewModel.cs (1)
71return EnumerateOptions().ToDictionary(x => x.description, x => x.value);
EditorConfigSettings\Whitespace\ViewModel\TabSizeViewModel.cs (1)
41return EnumerateOptions().ToDictionary(x => x.description, x => x.value);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
EditorConfigSettings\BinaryOperatorSpacingOptionsViewModel.cs (1)
34return EnumerateOptions().ToDictionary(x => x.description, x => x.value);
EditorConfigSettings\LabelPositionOptionsViewModel.cs (1)
56return EnumerateOptions().ToDictionary(x => x.description, x => x.value);
Mvc.Api.Analyzers.Test (1)
IgnoreCS1701WarningCodeFixRunner.cs (1)
14return options.WithSpecificDiagnosticOptions(new[] { "CS1701" }.ToDictionary(c => c, _ => ReportDiagnostic.Suppress));
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
23return dictionary.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.AsImmutable());
Roslyn.VisualStudio.Next.UnitTests (2)
UnifiedSettings\UnifiedSettingsTests.cs (2)
133var propertyToCategory = categories.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Deserialize<Category>()); 233var propertyToCategory = categories.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Deserialize<Category>());
sdk-tasks (1)
CalculateTemplateVersions.cs (1)
47.ToDictionary(g => g.Key, g =>
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
95var referencesByName = References.ToDictionary(r => Path.GetFileNameWithoutExtension(r.ItemSpec), r => r.ItemSpec);
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
1172private readonly IReadOnlyDictionary<TKey, TValue> _dictionary = values.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
System.Composition.TypedParts (2)
System\Composition\Hosting\SinglePartExportDescriptorProvider.cs (1)
30var subsetOfConstraints = contract.MetadataConstraints.Where(c => Metadata.ContainsKey(c.Key)).ToDictionary(c => c.Key, c => Metadata[c.Key]);
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (1)
89var subsettedConstraints = contract.MetadataConstraints.Where(c => export.Metadata.ContainsKey(c.Key)).ToDictionary(c => c.Key, c => export.Metadata[c.Key]);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
27.ToDictionary(kvp => kvp.Key.Substring(TestingOptionsPrefix.Length + 1), kvp => kvp.Value);
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
27.ToDictionary(kvp => kvp.Key.Substring(TestingOptionsPrefix.Length + 1), kvp => kvp.Value);
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
27.ToDictionary(kvp => kvp.Key.Substring(TestingOptionsPrefix.Length + 1), kvp => kvp.Value);
Templates.Tests (1)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
27.ToDictionary(kvp => kvp.Key.Substring(TestingOptionsPrefix.Length + 1), kvp => kvp.Value);
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
VersioningWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
34.ToDictionary(kvp => kvp.Key.Substring("link_".Length), kvp => (object)kvp.Value[0]);
Wasm.Performance.TestApp (1)
Person.cs (1)
27.ToDictionary(c => c, _ => rng.Next(0, 2) == 0),
xunit.assert (1)
Sdk\AssertHelper.cs (1)
172 .ToDictionary(g => g.name, g => g.getter);