70 references to ToImmutableDictionary
AnalyzerRunner (4)
CodeRefactoringRunner.cs (2)
155return refactorings.ToImmutableDictionary( 232return languages.ToImmutableDictionary(
DiagnosticAnalyzerRunner.cs (2)
234return analyzers.ToImmutableDictionary( 296.ToImmutableDictionary(
Microsoft.AspNetCore.Analyzers (1)
StartupAnalysisBuilder.cs (1)
35_analysesByType.ToImmutableDictionary(
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
185return _analyzerExecutionTimeMap.ToImmutableDictionary(pair => pair.Key, pair => TimeSpan.FromTicks(pair.Value.Value));
Emit\EditAndContinue\DefinitionMap.cs (1)
60.ToImmutableDictionary(edit => (IMethodSymbolInternal)GetISymbolInternalOrNull(edit.NewSymbol!)!, edit => edit.Instrumentation);
Microsoft.CodeAnalysis.Analyzers (1)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (1)
361return builder.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutable());
Microsoft.CodeAnalysis.CSharp (1)
Lowering\LocalRewriter\LocalRewriter_BasePatternSwitchLocalRewriter.cs (1)
71var switchSections = _switchArms.ToImmutableDictionary(kv => kv.Key, kv => kv.Value.ToImmutableAndFree());
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
169.ToImmutableDictionary(
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
169.ToImmutableDictionary(
Microsoft.CodeAnalysis.EditorFeatures (1)
ExternalAccess\IntelliCode\IntentProcessor.cs (1)
32return lazyIntentProviders.ToImmutableDictionary(
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Remote\RazorRemoteServiceCallbackDispatcherRegistry.cs (1)
20_lazyDispatchers = lazyDispatchers.ToImmutableDictionary(e => e.serviceType, e => e.dispatcher);
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (2)
RazorPredefinedProviderNameTests.cs (2)
53.ToImmutableDictionary(field => field.Name, field => (string)field.GetValue(null)!); 60.ToImmutableDictionary(property => property.Name, property => (string)property.GetValue(null)!);
Microsoft.CodeAnalysis.Features (20)
CodeFixes\Service\CodeFixService.cs (2)
908return mutableMap.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableAndFree()); 995return builder.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableAndFree());
CodeRefactorings\CodeRefactoringService.cs (1)
41private readonly Lazy<ImmutableDictionary<CodeRefactoringProvider, CodeChangeProviderMetadata>> _lazyRefactoringToMetadataMap = new(() => providers.Where(provider => provider.IsValueCreated).ToImmutableDictionary(provider => provider.Value, provider => provider.Metadata));
Diagnostics\Service\EngineV2\InProcOrRemoteHostAnalyzerRunner.cs (4)
113var result = builderMap.ToImmutableDictionary(kv => kv.Key, kv => DiagnosticAnalysisResult.CreateFromBuilder(kv.Value)); 201result.Value.Diagnostics.ToImmutableDictionary( 209result.Value.Telemetry.ToImmutableDictionary( 224.ToImmutableDictionary(entry => entry.documentId, entry => entry.diagnostics);
EditAndContinue\ActiveStatementsMap.cs (1)
93var byDocumentPath = updatedSpansByDocumentPath.ToImmutableDictionary(
EditAndContinue\EmitSolutionUpdateResults.cs (1)
99ProjectsToRestart = runningProjects.Keys.ToImmutableDictionary(keySelector: static p => p, elementSelector: static p => ImmutableArray.Create(p)),
Extensions\ExtensionFolder.cs (2)
92.ToImmutableDictionary(h => h.Name, h => (IExtensionMessageHandlerWrapper)h); 95.ToImmutableDictionary(h => h.Name, h => (IExtensionMessageHandlerWrapper)h);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
47_analyzerProviders = analyzerProviders.GroupBy(kv => kv.Metadata.Name).ToImmutableDictionary(g => g.Key, g => g.ToImmutableArray());
ExternalAccess\Watch\Api\WatchHotReloadService.cs (1)
209var runningProjectsImpl = runningProjects.ToImmutableDictionary(
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
348.ToImmutableDictionary(tuple => tuple.parameter, tuple => tuple.syntaxNode);
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (2)
330.ToImmutableDictionary( 382.ToImmutableDictionary(
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
222.ToImmutableDictionary(symbol => GetNewSymbolName(symbol, targetNamespace), symbol => symbol);
Shared\Utilities\AnnotatedSymbolMapping.cs (1)
104var immutableDocumentIdToSymbolsMap = documentIdToSymbolsMap.ToImmutableDictionary(
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (2)
58.ToImmutableDictionary(t => t.Key, t => t.Value.ToImmutableDictionary(l => l.Key.Split('/')[0], l => l.Key));
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\ActiveStatementsDescription.cs (1)
48documentPathMap: oldDocumentMap.ToImmutableDictionary(e => e.Key, e => e.Value.OrderBy(ActiveStatementsMap.Comparer).ToImmutableArray()),
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
227var runningProjects = solution.ProjectIds.ToImmutableDictionary(
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EmitSolutionUpdateResultsTests.cs (1)
57=> projectIds.ToImmutableDictionary(keySelector: e => e.id, elementSelector: e => new RunningProjectOptions() { RestartWhenChangesHaveNoEffect = e.noEffectRestarts });
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
116return fileCounts.ToImmutableDictionary(kvp => VsTfmAndFileExtHashingAlgorithm.HashInput(kvp.Key), kvp => kvp.Value);
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Handler\Diagnostics\BuildOnlyDiagnosticIdsHandler.cs (1)
35.ToImmutableDictionary(lazy => lazy.Metadata.LanguageName, lazy => lazy.Metadata.BuildOnlyDiagnostics);
Handler\Diagnostics\DiagnosticSourceProviders\DiagnosticSourceManager.cs (2)
40.ToImmutableDictionary(kvp => kvp.Name, kvp => kvp); 44.ToImmutableDictionary(kvp => kvp.Name, kvp => kvp);
Handler\SemanticTokens\SemanticTokensSchema.cs (2)
63.ToImmutableDictionary( 74.ToImmutableDictionary(
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
DeterministicKeyBuilderTests.cs (1)
402var map = values.ToImmutableDictionary(
Microsoft.CodeAnalysis.Remote.Workspaces (3)
ExternalAccess\Pythia\Api\PythiaRemoteServiceCallbackDispatcherRegistry.cs (1)
20_lazyDispatchers = lazyDispatchers.ToImmutableDictionary(e => e.serviceType, e => e.dispatcher);
ExternalAccess\UnitTesting\Api\UnitTestingRemoteServiceCallbackDispatcherRegistry.cs (1)
20_lazyDispatchers = lazyDispatchers.ToImmutableDictionary(e => e.serviceType, e => e.dispatcher);
ServiceDescriptors.cs (1)
109_descriptors = interfaces.ToImmutableDictionary(i => i.serviceInterface, i => CreateDescriptors(i.serviceInterface, i.callbackInterface));
Microsoft.CodeAnalysis.Test.Utilities (3)
MarkedSource\SourceWithMarkedNodes.cs (2)
108=> MarkedSpans.ToImmutableDictionary( 113=> MarkedSpans.ToImmutableDictionary(
Metadata\ILValidation.cs (1)
392.Descendants().ToImmutableDictionary(e => e.Attribute("id").Value, e => e.Attribute("name").Value);
Microsoft.CodeAnalysis.Workspaces (8)
CodeRefactorings\FixAllOccurences\FixAllState.cs (1)
123return documentsToFix.ToImmutableDictionary(d => d, _ => default(Optional<ImmutableArray<TextSpan>>));
Diagnostics\DiagnosticAnalysisResultBuilder.cs (1)
193: map.ToImmutableDictionary(kv => kv.Key, kv => kv.Value.ToImmutableArray());
Editing\SymbolEditor.cs (1)
135.ToImmutableDictionary(g => g.Key, g => ImmutableArray.CreateRange(g));
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex_Create.cs (1)
30extensionMethodInfo.ToImmutableDictionary(
Log\FunctionIdExtensions.cs (1)
14() => Enum.GetValues<FunctionId>().ToImmutableDictionary(f => f, f => f.ToString()));
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
786.ToImmutableDictionary(
Rename\ConflictEngine\MutableConflictResolution.cs (1)
153var documentToRelatedLocationsMap = this.RelatedLocations.GroupBy(loc => loc.DocumentId).ToImmutableDictionary(
Shared\Extensions\ILanguageMetadataExtensions.cs (1)
61return map.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableAndFree());
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
OptionsCollection.cs (1)
86=> new TestOptionSet(_options.ToImmutableDictionary(entry => new OptionKey(entry.Key.Option, entry.Key.Language), entry => entry.Value));
Microsoft.DotNet.Build.Tasks.Feed (4)
src\model\SetupTargetFeedConfigV3.cs (2)
74FeedKeys = feedKeys.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Key")); 75FeedOverrides = feedOverrides.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Replacement"));
src\model\SetupTargetFeedConfigV4.cs (2)
73FeedKeys = feedKeys.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Key")); 74FeedOverrides = feedOverrides.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Replacement"));
Microsoft.Interop.SourceGeneration (1)
ValueEqualityImmutableDictionary.cs (1)
71return new ValueEqualityImmutableDictionary<TKey, TValue>(source.ToImmutableDictionary(keySelector, valueSelector));
Microsoft.VisualStudio.LanguageServices (4)
ColorSchemes\ColorSchemeApplier.cs (1)
100_colorSchemeRegistryItems ??= _colorSchemes.ToImmutableDictionary(
ColorSchemes\ColorSchemeApplier.Settings.cs (1)
47}.ToImmutableDictionary(name => name, GetColorScheme);
Options\VisualStudioOptionPersisterProvider.cs (1)
43_readFallbacks = readFallbacks.ToImmutableDictionary(item => item.Metadata.ConfigName, item => item);
PullMemberUp\SymbolDependentsBuilder.cs (1)
25return membersInType.ToImmutableDictionary(
Roslyn.VisualStudio.Next.UnitTests (1)
Options\VisualStudioSettingsOptionPersisterTests.cs (1)
110var fallbacks = exportProvider.GetExports<IVisualStudioStorageReadFallback, OptionNameMetadata>().ToImmutableDictionary(item => item.Metadata.ConfigName, item => item);