6 instantiations of ImmutableDictionary
System.Collections.Immutable (6)
System\Collections\Immutable\ImmutableDictionary_2.cs (6)
25public static readonly ImmutableDictionary<TKey, TValue> Empty = new ImmutableDictionary<TKey, TValue>(); 449return new ImmutableDictionary<TKey, TValue>(_root, comparers, _count); 455var set = new ImmutableDictionary<TKey, TValue>(comparers); 841: new ImmutableDictionary<TKey, TValue>(comparers); 1052return new ImmutableDictionary<TKey, TValue>(root, comparers, count); 1070return root.IsEmpty ? this.Clear() : new ImmutableDictionary<TKey, TValue>(root, _comparers, adjustedCountIfDifferentRoot);
3043 references to ImmutableDictionary
Aspire.Dashboard (2)
Model\ResourceViewModel.cs (1)
39public required ImmutableDictionary<string, ResourcePropertyViewModel> Properties { get; init; }
ServiceClient\Partials.cs (1)
156private ImmutableDictionary<string, ResourcePropertyViewModel> CreatePropertyViewModels(RepeatedField<ResourceProperty> properties, IKnownPropertyLookup knownPropertyLookup, ILogger logger)
Aspire.Dashboard.Components.Tests (9)
Pages\ResourcesTests.cs (8)
364ImmutableDictionary<string, ResourcePropertyViewModel>? properties = null, 386Properties = properties ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty, 554var parameterProperties = ImmutableDictionary<string, ResourcePropertyViewModel>.Empty 598var parameterProperties = ImmutableDictionary<string, ResourcePropertyViewModel>.Empty 640var parameterProperties = ImmutableDictionary<string, ResourcePropertyViewModel>.Empty
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
45Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty,
Aspire.Dashboard.Tests (1)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
45Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty,
Aspire.Hosting.Analyzers.Tests (1)
AnalyzerTest.cs (1)
38var specificDiagnosticOptions = compilationOptions.SpecificDiagnosticOptions
dotnet (4)
Commands\Run\RunCommand.cs (1)
952environmentVariables: parseResult.GetValue(definition.EnvOption) ?? ImmutableDictionary<string, string>.Empty
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (1)
36EnvironmentVariables: parseResult.GetValue(definition.EnvOption) ?? ImmutableDictionary<string, string>.Empty);
Commands\Test\VSTest\VSTestArgumentConverter.cs (2)
21private static readonly ImmutableDictionary<string, string> s_argumentMapping 40private static readonly ImmutableDictionary<string, string> s_verbosityMapping
dotnet-format (16)
Analyzers\AnalyzerFormatter.cs (11)
64var projectAnalyzersAndFixers = _informationProvider.GetAnalyzersAndFixers(workspace, solution, formatOptions, logger); 95var projectAnalyzers = await FilterAnalyzersAsync(solution, projectAnalyzersAndFixers, formattablePaths, severity, formatOptions.Diagnostics, formatOptions.ExcludeDiagnostics, cancellationToken).ConfigureAwait(false); 98var projectDiagnostics = await GetProjectDiagnosticsAsync(solution, projectAnalyzers, formattablePaths, formatOptions, severity, fixableCompilerDiagnostics, logger, formattedFiles, cancellationToken).ConfigureAwait(false); 143private async Task<ImmutableDictionary<ProjectId, ImmutableHashSet<string>>> GetProjectDiagnosticsAsync( 145ImmutableDictionary<ProjectId, ImmutableArray<DiagnosticAnalyzer>> projectAnalyzers, 199ImmutableDictionary<ProjectId, ImmutableArray<DiagnosticAnalyzer>> projectAnalyzers, 201ImmutableDictionary<ProjectId, ImmutableHashSet<string>> projectDiagnostics, 216var fixersById = CreateFixerMap(reportedDiagnostics, allFixers); 262static ImmutableDictionary<string, ImmutableArray<CodeFixProvider>> CreateFixerMap( 285internal static async Task<ImmutableDictionary<ProjectId, ImmutableArray<DiagnosticAnalyzer>>> FilterAnalyzersAsync( 287ImmutableDictionary<ProjectId, AnalyzersAndFixers> projectAnalyzersAndFixers,
Analyzers\AnalyzerReferenceInformationProvider.cs (1)
19public ImmutableDictionary<ProjectId, AnalyzersAndFixers> GetAnalyzersAndFixers(
Analyzers\CodeStyleInformationProvider.cs (2)
20public ImmutableDictionary<ProjectId, AnalyzersAndFixers> GetAnalyzersAndFixers( 40var perProjectAnalyzersAndFixers = referenceProvider.GetAnalyzersAndFixers(workspace, solution, formatOptions, logger);
Analyzers\Interfaces\IAnalyzerInformationProvider.cs (1)
13ImmutableDictionary<ProjectId, AnalyzersAndFixers> GetAnalyzersAndFixers(
Logging\SimpleConsoleLogger.cs (1)
20private static ImmutableDictionary<LogLevel, ConsoleColor> LogLevelColorMap => new Dictionary<LogLevel, ConsoleColor>
GenerateDocumentationAndConfigFiles (125)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (3)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer); 19internal readonly ImmutableDictionary<string, string> Options; 21public DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
687public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 698public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (10)
27ImmutableDictionary<string, string?>? properties, 35ImmutableDictionary<string, string?>? properties, 54ImmutableDictionary<string, string?>? properties, 64ImmutableDictionary<string, string?>? properties, 89ImmutableDictionary<string, string?>? properties, 102properties: ImmutableDictionary<string, string?>.Empty, 108ImmutableDictionary<string, string?>? properties, 116ImmutableDictionary<string, string?>? properties, 143ImmutableDictionary<string, string?>? properties, 169ImmutableDictionary<string, string?>? properties,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
70internal static int Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary) 78internal static void Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary, ref RoslynHashCode hashCode)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
31ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty); 34private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions; 36private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (19)
31private readonly ImmutableDictionary<string, TValue> _names; 32private readonly ImmutableDictionary<ISymbol, TValue> _symbols; 54private readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> _wildcardNamesBySymbolKind; 63private SymbolNamesWithValueOption(ImmutableDictionary<string, TValue> names, ImmutableDictionary<ISymbol, TValue> symbols, 64ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> wildcardNamesBySymbolKind) 75_names = ImmutableDictionary<string, TValue>.Empty; 76_symbols = ImmutableDictionary<ISymbol, TValue>.Empty; 77_wildcardNamesBySymbolKind = ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>>.Empty; 310if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 320if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 330if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) && 373internal ref readonly ImmutableDictionary<string, TValue> Names => ref _symbolNamesWithValueOption._names; 375internal ref readonly ImmutableDictionary<ISymbol, TValue> Symbols => ref _symbolNamesWithValueOption._symbols; 377internal ref readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> WildcardNamesBySymbolKind => ref _symbolNamesWithValueOption._wildcardNamesBySymbolKind;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (5)
20private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new(); 36var optionsMap = TryGetBackingOptionsDictionary(analyzerConfigOptions); 50static ImmutableDictionary<string, string>? TryGetBackingOptionsDictionary(AnalyzerConfigOptions analyzerConfigOptions) 56return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 57type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (3)
19public ImmutableDictionary<TKey, TValue> ToImmutableDictionaryAndFree<TKey, TValue>( 23ImmutableDictionary<TKey, TValue> result; 26result = ImmutableDictionary<TKey, TValue>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (3)
40public static ImmutableDictionary<CaptureId, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg) 49ImmutableDictionary<CaptureId, FlowCaptureKind>.Builder lvalueFlowCaptureIdBuilder = null; 80return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<CaptureId, FlowCaptureKind>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
197public ImmutableDictionary<CaptureId, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
13ImmutableDictionary<(ISymbol symbol, IOperation write), bool> symbolWritesMap, 33public ImmutableDictionary<(ISymbol symbol, IOperation write), bool> SymbolWritesMap { get; } = symbolWritesMap;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (5)
57var serializedNameMap = AssignNamesToNamingStyleElements(symbolSpecifications, namingStyles); 58var ruleNameMap = AssignNamesToNamingStyleRules(rules, serializedNameMap); 119private static ImmutableDictionary<Guid, string> AssignNamesToNamingStyleElements( 170private static ImmutableDictionary<NamingRule, string> AssignNamesToNamingStyleRules(ImmutableArray<NamingRule> namingRules, ImmutableDictionary<Guid, string> serializedNameMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
113=> CreateSerializerForEnum(map, ImmutableDictionary<string, T>.Empty); 119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum 130var alternativeMap = ImmutableDictionary<string, T>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 35!treeMap.TryGetValue((semanticModel.SyntaxTree, namespaceId), out var symbolMap))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (4)
20private readonly ImmutableDictionary<TKey, TValue> _forwardMap; 21private readonly ImmutableDictionary<TValue, TKey> _backwardMap; 35private BidirectionalMap(ImmutableDictionary<TKey, TValue> forwardMap, ImmutableDictionary<TValue, TKey> backwardMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\ImmutableDictionaryExtensions.cs (2)
12public static bool KeysEqual<TKey, TValue>(this ImmutableDictionary<TKey, TValue> self, ImmutableDictionary<TKey, TValue> other)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
158public static ImmutableDictionary<TKey, ImmutableHashSet<TValue>> MultiRemove<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (4)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 41return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty.SetItem(document, documentDiagnostics); 106return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty; 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
41ImmutableDictionary<string, string?> properties,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (1)
32var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(fixAllContext).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
284ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewFieldMap, bool isContainedInUnsafeType) 306ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewPropertyMap, bool isContainedInUnsafeType)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
484ImmutableDictionary<string, ISymbol>? parameterToExistingMemberMap, 485ImmutableDictionary<string, string>? parameterToNewMemberMap,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
18private static readonly ImmutableDictionary<BinaryOperatorKind, BinaryOperatorKind> s_negatedBinaryMap =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (9)
59private ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> _semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 73var map = _semanticModelMap; 82_semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 113var originalMap = _semanticModelMap; 125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 138ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map, Document document, SyntaxNode bodyNode, CancellationToken cancellationToken) 175ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (2)
25private ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 26= ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (6)
27private ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 28= ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)>.Empty; 34private ImmutableDictionary<string, MefLanguageServices> _languageServicesMap 35= ImmutableDictionary<string, MefLanguageServices>.Empty; 74var allLanguageServices = Interlocked.Exchange(ref _languageServicesMap, _languageServicesMap.Clear()); 177var currentServicesMap = _languageServicesMap;
ILCompiler.ReadyToRun (1)
Compiler\ReadyToRunXmlRootProvider.cs (1)
87: base(null , context, documentStream, resource, owningModule, xmlDocumentLocation, ImmutableDictionary<string, bool>.Empty)
ILLink.RoslynAnalyzer (10)
DataFlow\LocalDataFlowAnalysis.cs (3)
110var lValueFlowCaptures = LValueFlowCapturesProvider.CreateLValueFlowCaptures(cfg); 118var lValueFlowCaptures = LValueFlowCapturesProvider.CreateLValueFlowCaptures(cfg); 131ImmutableDictionary<CaptureId, FlowCaptureKind> lValueFlowCaptures,
DataFlow\LocalDataFlowVisitor.cs (2)
49private readonly ImmutableDictionary<CaptureId, FlowCaptureKind> lValueFlowCaptures; 64ImmutableDictionary<CaptureId, FlowCaptureKind> lValueFlowCaptures,
DataFlow\LValueFlowCaptureProvider.cs (3)
51public static ImmutableDictionary<CaptureId, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg) 60ImmutableDictionary<CaptureId, FlowCaptureKind>.Builder? lvalueFlowCaptureIdBuilder = null; 91return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<CaptureId, FlowCaptureKind>.Empty;
TrimAnalysis\TrimAnalysisVisitor.cs (1)
54ImmutableDictionary<CaptureId, FlowCaptureKind> lValueFlowCaptures,
TrimAnalysis\TrimDataFlowAnalysis.cs (1)
63ImmutableDictionary<CaptureId, FlowCaptureKind> lValueFlowCaptures,
Microsoft.Analyzers.Extra.Tests (1)
CallAnalysis\ArraysTests.cs (1)
122Assembly.GetAssembly(typeof(ImmutableDictionary<,>))!,
Microsoft.AspNetCore.Analyzers (2)
StartupAnalysis.cs (2)
11private readonly ImmutableDictionary<INamedTypeSymbol, ImmutableArray<object>> _analysesByType; 15ImmutableDictionary<INamedTypeSymbol, ImmutableArray<object>> analysesByType)
Microsoft.AspNetCore.Components.Endpoints (14)
FormMapping\Converters\DictionaryAdapters\ImmutableDictionaryBufferAdapter.cs (10)
9: IDictionaryBufferAdapter<ImmutableDictionary<TKey, TValue>, ImmutableDictionary<TKey, TValue>.Builder, TKey, TValue> 12public static ImmutableDictionary<TKey, TValue>.Builder Add(ref ImmutableDictionary<TKey, TValue>.Builder buffer, TKey key, TValue value) 18public static ImmutableDictionary<TKey, TValue>.Builder CreateBuffer() => ImmutableDictionary.CreateBuilder<TKey, TValue>(); 20public static ImmutableDictionary<TKey, TValue> ToResult(ImmutableDictionary<TKey, TValue>.Builder buffer) => buffer.ToImmutable(); 27ImmutableDictionary<TKey, TValue>, 29ImmutableDictionary<TKey, TValue>.Builder, 32ImmutableDictionary<TKey, TValue>.Builder,
FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (4)
46var _ when type == (typeof(ImmutableDictionary<TKey, TValue>)) => true, 114var _ when type == (typeof(ImmutableDictionary<TKey, TValue>)) => 116ImmutableDictionary<TKey, TValue>, 118ImmutableDictionary<TKey, TValue>.Builder,
Microsoft.AspNetCore.Http.Extensions (14)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Converters\DictionaryAdapters\ImmutableDictionaryBufferAdapter.cs (10)
9: IDictionaryBufferAdapter<ImmutableDictionary<TKey, TValue>, ImmutableDictionary<TKey, TValue>.Builder, TKey, TValue> 12public static ImmutableDictionary<TKey, TValue>.Builder Add(ref ImmutableDictionary<TKey, TValue>.Builder buffer, TKey key, TValue value) 18public static ImmutableDictionary<TKey, TValue>.Builder CreateBuffer() => ImmutableDictionary.CreateBuilder<TKey, TValue>(); 20public static ImmutableDictionary<TKey, TValue> ToResult(ImmutableDictionary<TKey, TValue>.Builder buffer) => buffer.ToImmutable(); 27ImmutableDictionary<TKey, TValue>, 29ImmutableDictionary<TKey, TValue>.Builder, 32ImmutableDictionary<TKey, TValue>.Builder,
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (4)
46var _ when type == (typeof(ImmutableDictionary<TKey, TValue>)) => true, 114var _ when type == (typeof(ImmutableDictionary<TKey, TValue>)) => 116ImmutableDictionary<TKey, TValue>, 118ImmutableDictionary<TKey, TValue>.Builder,
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointModelMetadata.cs (1)
18public override IReadOnlyDictionary<object, object> AdditionalValues { get; } = ImmutableDictionary<object, object>.Empty;
Microsoft.AspNetCore.Razor.Utilities.Shared (15)
ArrayExtensions.cs (1)
183public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(
PooledObjects\DictionaryBuilderPool`2.cs (5)
10/// A pool of <see cref="ImmutableDictionary{TKey, TValue}.Builder"/> instances. 17internal sealed partial class DictionaryBuilderPool<TKey, TValue> : CustomObjectPool<ImmutableDictionary<TKey, TValue>.Builder> 35public static PooledObject<ImmutableDictionary<TKey, TValue>.Builder> GetPooledObject() 38public static PooledObject<ImmutableDictionary<TKey, TValue>.Builder> GetPooledObject( 39out ImmutableDictionary<TKey, TValue>.Builder builder)
PooledObjects\DictionaryBuilderPool`2.Policy.cs (2)
32public override ImmutableDictionary<TKey, TValue>.Builder Create() 35public override bool Return(ImmutableDictionary<TKey, TValue>.Builder builder)
PooledObjects\PooledDictionaryBuilder`2.cs (4)
11/// Wraps a pooled <see cref="ImmutableDictionary{TKey, TValue}.Builder"/> but doesn't allocate it until 20private ImmutableDictionary<TKey, TValue>.Builder? _builder; 98public readonly ImmutableDictionary<TKey, TValue> ToImmutable() 99=> _builder?.ToImmutable() ?? ImmutableDictionary<TKey, TValue>.Empty;
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
Microsoft.Build (69)
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
19return ImmutableDictionary<string, string?>.Empty;
BuildCheck\Infrastructure\EditorConfig\EditorConfigFile.cs (2)
154public Section(string name, ImmutableDictionary<string, string> properties) 170public ImmutableDictionary<string, string> Properties { get; }
Collections\CopyOnWritePropertyDictionary.cs (8)
42private static readonly ImmutableDictionary<string, T> NameComparerDictionaryPrototype = ImmutableDictionary.Create<string, T>(MSBuildNameIgnoreCaseComparer.Default); 47private ImmutableDictionary<string, T> _backing; 141public ImmutableDictionary<string, T>.Enumerator GetEnumerator() => _backing.GetEnumerator(); 170ImmutableDictionary<string, T> thisBacking = _backing; 171ImmutableDictionary<string, T> thatBacking = other._backing; 215ImmutableDictionary<string, T> thisBacking = _backing; 357ImmutableDictionary<string, T>.Builder builder = null; 397private ImmutableDictionary<string, T>.Enumerator _dictionaryEnumerator;
Evaluation\LazyItemEvaluator.cs (2)
462private static readonly ImmutableDictionary<string, LazyItemList> s_emptyIgnoreCase = ImmutableDictionary.Create<string, LazyItemList>(StringComparer.OrdinalIgnoreCase); 468public ImmutableDictionary<string, LazyItemList>.Builder ReferencedItemLists { get; } = Traits.Instance.EscapeHatches.UseCaseSensitiveItemNames ?
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
23private readonly ImmutableDictionary<string, LazyItemList> _referencedItemLists;
Graph\GraphBuilder.cs (3)
274ImmutableDictionary<string, string>.Builder solutionGlobalPropertiesBuilder = ImmutableDictionary.CreateBuilder( 317Dictionary<string, ImmutableDictionary<string, string>> globalPropertiesForProjectConfiguration = new(StringComparer.OrdinalIgnoreCase); 337if (!globalPropertiesForProjectConfiguration.TryGetValue(projectConfiguration.FullName, out ImmutableDictionary<string, string> projectGlobalProperties))
Graph\GraphBuildRequestData.cs (1)
231return ImmutableDictionary<string, string?>.Empty;
Graph\GraphBuildResult.cs (1)
34ResultsByNode = ImmutableDictionary<ProjectGraphNode, BuildResult>.Empty;
Graph\ProjectInterpretation.cs (6)
322var newProperties = defaultParts.Properties; 345public ImmutableDictionary<string, string> Properties { get; } 346public ImmutableDictionary<string, string> AdditionalProperties { get; } 350ImmutableDictionary<string, string> properties, 351ImmutableDictionary<string, string> additionalProperties, 426return ImmutableDictionary<string, string>.Empty;
Instance\ImmutableProjectCollections\ImmutableProjectMetadataCollectionConverter.cs (3)
32private ImmutableDictionary<string, string>? _convertedPropertiesDictionary; 100public ImmutableDictionary<string, string> ToImmutableDictionary() 104var newDictionary = _properties.ToImmutableDictionary(
Instance\ProjectInstance.cs (2)
1033ImmutableDictionary<string, string> metadata = null; 3460ImmutableDictionary<string, string> directMetadata = null;
Instance\ProjectItemDefinitionInstance.cs (3)
37private ImmutableDictionary<string, string> _metadata; 74internal ProjectItemDefinitionInstance(string itemType, ImmutableDictionary<string, string> metadata) 141internal ImmutableDictionary<string, string> BackingMetadata => _metadata ?? ImmutableDictionaryExtensions.EmptyMetadata;
Instance\ProjectItemInstance.cs (20)
126ImmutableDictionary<string, string> metadata = null; 625ImmutableDictionary<string, string> metadata = ImmutableDictionaryExtensions.EmptyMetadata 649internal void SetMetadata(ImmutableDictionary<string, string> metadataDictionary) 676internal void SetMetadataOnTaskOutput(ImmutableDictionary<string, string> items) 975ImmutableDictionary<string, string> metadataCollection = MetadataCollection; 1081private ImmutableDictionary<string, string> DirectMetadata 1089else if (_directMetadata is ImmutableDictionary<string, string> realImplementation) 1099var directMetadata = _directMetadata.ToImmutableDictionary(MSBuildNameIgnoreCaseComparer.Default); 1119var list = _itemDefinitions != null ? MetadataCollection : DirectMetadata; 1175if (DirectMetadataCount == 0 && metadata is ImmutableDictionary<string, string> immutableMetadata) 1216private IEnumerable<KeyValuePair<string, string>> EnumerateMetadata(ImmutableDictionary<string, string> list) 1232internal ImmutableDictionary<string, string> MetadataCollection 1248ImmutableDictionary<string, string> lastItemDefinition = _itemDefinitions[_itemDefinitions.Count - 1].BackingMetadata; 1638var metadata = MetadataCollection; 1788ImmutableDictionary<string, string> otherMetadata = other.MetadataCollection; 1905ImmutableDictionary<string, string> temp = MetadataCollection; 1970internal void SetMetadata(ImmutableDictionary<string, string> metadata) 2053internal void SetMetadataOnTaskOutput(ImmutableDictionary<string, string> items) 2172internal MetadataNamesEnumerator(ImmutableDictionary<string, string> metadataCollection) 2309ImmutableDictionary<string, string> metadata = ImmutableDictionaryExtensions.EmptyMetadata;
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Extensions\IEnumerableExtensions.cs (2)
725public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 736public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
Microsoft.Build.Framework (25)
BackEnd\TranslatorHelpers.cs (3)
225ImmutableDictionary<string, string>.Builder builder = ImmutableDictionary.Create<string, string>(comparer).ToBuilder(); 244ref ImmutableDictionary<string, string> dictionary, 254dictionary = (ImmutableDictionary<string, string>)localDict;
Collections\CopyOnWriteDictionary.cs (14)
36private static readonly ImmutableDictionary<string, V> NameComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(MSBuildNameIgnoreCaseComparer.Default); 43private static readonly ImmutableDictionary<string, V> OrdinalIgnoreCaseComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(StringComparer.OrdinalIgnoreCase); 49private ImmutableDictionary<string, V> _backing; 56_backing = ImmutableDictionary<string, V>.Empty; 77var b = GetInitialDictionary((IEqualityComparer<string>?)comparer); 82private static ImmutableDictionary<string, V> GetInitialDictionary(IEqualityComparer<string>? keyComparer) 101_backing = dictionary.GetType() == typeof(ImmutableDictionary<string, V>) 102? (ImmutableDictionary<string, V>)dictionary 173internal ImmutableDictionary<string, V> BackingDictionary => _backing; 236ImmutableDictionary<string, V> initial = _backing; 290ImmutableDictionary<string, V> initial = _backing; 301public ImmutableDictionary<string, V>.Enumerator GetEnumerator() 308ImmutableDictionary<string, V>.Enumerator enumerator = _backing.GetEnumerator(); 399ImmutableDictionary<string, V> snapshot = _backing;
ImmutableDictionaryExtensions.cs (5)
16public static readonly ImmutableDictionary<string, string> EmptyMetadata = 17ImmutableDictionary<string, string>.Empty.WithComparers(MSBuildNameIgnoreCaseComparer.Default); 27public static ImmutableDictionary<string, string> SetItems( 28this ImmutableDictionary<string, string> dictionary, 32ImmutableDictionary<string, string>.Builder builder = dictionary.ToBuilder();
ProjectStartedEventArgs.cs (1)
254? ImmutableDictionary<string, string>.Empty
SerializableMetadata.cs (2)
27public SerializableMetadata(ImmutableDictionary<string, string> dictionary) => 43internal ImmutableDictionary<string, string>? Dictionary { get; }
Microsoft.Build.Tasks.Git (9)
GitDataReader\GitConfig.cs (3)
15public static readonly GitConfig Empty = new(ImmutableDictionary<GitVariableName, ImmutableArray<string>>.Empty); 30public readonly ImmutableDictionary<GitVariableName, ImmutableArray<string>> Variables; 39public GitConfig(ImmutableDictionary<GitVariableName, ImmutableArray<string>> variables)
GitDataReader\GitReferenceResolver.cs (5)
30private readonly Lazy<ImmutableDictionary<string, string>> _lazyPackedReferences; 62private ImmutableDictionary<string, string> ReadPackedReferences(string gitDirectory) 69return ImmutableDictionary<string, string>.Empty; 79return ImmutableDictionary<string, string>.Empty; 89internal ImmutableDictionary<string, string> ReadPackedReferences(TextReader reader, string path)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.Build.Utilities.Core (5)
TaskItem.cs (5)
52private ImmutableDictionary<string, string> _metadata; 127ImmutableDictionary<string, string>.Builder builder = ImmutableDictionaryExtensions.EmptyMetadata.ToBuilder(); 355ImmutableDictionary<string, string> copiedMetadata; 356ImmutableDictionary<string, string> destinationMetadata = destinationAsTaskItem.Metadata.Dictionary; 558if ((_metadata == null || _metadata.IsEmpty) && metadata is ImmutableDictionary<string, string> immutableMetadata)
Microsoft.CodeAnalysis (236)
CodeGen\CompilationTestData.cs (3)
45private ImmutableDictionary<string, MethodData>? _lazyMethodsByName; 64public ImmutableDictionary<string, MethodData> GetMethodsByName() 81var methodsByName = map.Where(p => p.Value.Method != null).ToImmutableDictionary();
CommandLine\AnalyzerConfig.cs (2)
319public Section(string name, ImmutableDictionary<string, string> properties) 338public ImmutableDictionary<string, string> Properties { get; }
CommandLine\AnalyzerConfigOptionsResult.cs (6)
7using AnalyzerOptions = System.Collections.Immutable.ImmutableDictionary<string, string>; 8using TreeOptions = System.Collections.Immutable.ImmutableDictionary<string, Microsoft.CodeAnalysis.ReportDiagnostic>; 20public TreeOptions TreeOptions { get; } 25public AnalyzerOptions AnalyzerOptions { get; } 33TreeOptions treeOptions, 34AnalyzerOptions analyzerOptions,
CommandLine\AnalyzerConfigSet.cs (16)
19using AnalyzerOptions = System.Collections.Immutable.ImmutableDictionary<string, string>; 20using TreeOptions = System.Collections.Immutable.ImmutableDictionary<string, Microsoft.CodeAnalysis.ReportDiagnostic>; 54private readonly ObjectPool<TreeOptions.Builder> _treeOptionsPool = 55new ObjectPool<TreeOptions.Builder>(() => ImmutableDictionary.CreateBuilder<string, ReportDiagnostic>(Section.PropertiesKeyComparer)); 57private readonly ObjectPool<AnalyzerOptions.Builder> _analyzerOptionsPool = 58new ObjectPool<AnalyzerOptions.Builder>(() => ImmutableDictionary.CreateBuilder<string, string>(Section.PropertiesKeyComparer)); 395private static void ParseSectionOptions(Section section, TreeOptions.Builder treeBuilder, AnalyzerOptions.Builder analyzerBuilder, ArrayBuilder<Diagnostic> diagnosticBuilder, string analyzerConfigPath, ConcurrentDictionary<ReadOnlyMemory<char>, string> diagIdCache) 477private ImmutableDictionary<string, ImmutableDictionary<string, (string value, string configPath, int globalLevel)>.Builder>.Builder? _values; 478private ImmutableDictionary<string, ImmutableDictionary<string, (int globalLevel, ArrayBuilder<string> configPaths)>.Builder>.Builder? _duplicates; 487_values = ImmutableDictionary.CreateBuilder<string, ImmutableDictionary<string, (string, string, int)>.Builder>(Section.NameEqualityComparer); 488_duplicates = ImmutableDictionary.CreateBuilder<string, ImmutableDictionary<string, (int, ArrayBuilder<string>)>.Builder>(Section.NameEqualityComparer); 516return new GlobalAnalyzerConfig(new Section(GlobalSectionName, AnalyzerOptions.Empty), ImmutableArray<Section>.Empty); 559var result = dict.ToImmutableDictionary(d => d.Key, d => d.Value.value, Section.PropertiesKeyComparer);
CommandLine\CommandLineParser.cs (1)
1395internal static ImmutableDictionary<string, string> ParseFeatures(List<string> features)
CommandLine\CommonCompiler.cs (2)
1032var options = sourceFileAnalyzerConfigOptions[i].AnalyzerOptions; 1047var options = additionalFileOptions[i].AnalyzerOptions;
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (2)
68public override ImmutableDictionary<string, string?> Properties => ImmutableDictionary<string, string?>.Empty;
Compilation\Compilation.cs (2)
121set = ImmutableDictionary<string, string>.Empty; 3484var currentSynthesizedMembers = moduleBeingBuilt.GetAllSynthesizedMembers();
Compilation\CompilationOptions.cs (4)
195public ImmutableDictionary<string, ReportDiagnostic> SpecificDiagnosticOptions { get; protected set; } 283ImmutableDictionary<string, ReportDiagnostic> specificDiagnosticOptions, 390public CompilationOptions WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>? value) 541protected abstract CompilationOptions CommonWithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>? specificDiagnosticOptions);
Compilation\SyntaxTreeOptionsProvider.cs (2)
34public readonly ImmutableDictionary<string, ReportDiagnostic> DiagnosticOptions; 51private readonly ImmutableDictionary<SyntaxTree, Options> _options;
Diagnostic\Diagnostic.cs (13)
63/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 70ImmutableDictionary<string, string?>? properties, 110/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 118ImmutableDictionary<string, string?>? properties, 138/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 147ImmutableDictionary<string, string?>? properties, 192/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 209ImmutableDictionary<string, string?>? properties = null) 242/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 260ImmutableDictionary<string, string?>? properties = null) 407/// Gets property bag for the diagnostic. it will return <see cref="ImmutableDictionary{TKey, TValue}.Empty"/> 411public virtual ImmutableDictionary<string, string?> Properties 412=> ImmutableDictionary<string, string?>.Empty;
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
81public override ImmutableDictionary<string, string?> Properties
Diagnostic\Diagnostic_SimpleDiagnostic.cs (6)
28private readonly ImmutableDictionary<string, string?> _properties; 38ImmutableDictionary<string, string?>? properties, 53_properties = properties ?? ImmutableDictionary<string, string?>.Empty; 64ImmutableDictionary<string, string?>? properties, 74ImmutableDictionary<string, string?>? properties, bool isSuppressed = false) 141public override ImmutableDictionary<string, string?> Properties
Diagnostic\DiagnosticInfo.cs (2)
34private static ImmutableDictionary<int, DiagnosticDescriptor> s_errorCodeToDescriptorMap = ImmutableDictionary<int, DiagnosticDescriptor>.Empty;
DiagnosticAnalyzer\AnalysisResult.cs (19)
24ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSyntaxDiagnostics, 25ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSemanticDiagnostics, 26ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localAdditionalFileDiagnostics, 27ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> nonLocalDiagnostics, 28ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> analyzerTelemetryInfo) 46public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> SyntaxDiagnostics { get; } 51public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> SemanticDiagnostics { get; } 56public ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> AdditionalFileDiagnostics { get; } 61public ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> CompilationDiagnostics { get; } 66public ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> AnalyzerTelemetryInfo { get; } 113ImmutableDictionary<T, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localDiagnostics, 133ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> nonLocalDiagnostics,
DiagnosticAnalyzer\AnalysisResultBuilder.cs (20)
25private static readonly ImmutableDictionary<string, OneOrMany<AdditionalText>> s_emptyPathToAdditionalTextMap = 26ImmutableDictionary<string, OneOrMany<AdditionalText>>.Empty.WithComparers(PathUtilities.Comparer); 35private readonly ImmutableDictionary<string, OneOrMany<AdditionalText>> _pathToAdditionalTextMap; 64private static ImmutableDictionary<string, OneOrMany<AdditionalText>> CreatePathToAdditionalTextMap(ImmutableArray<AdditionalText> additionalFiles) 504ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSyntaxDiagnostics; 505ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSemanticDiagnostics; 506ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localAdditionalFileDiagnostics; 507ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> nonLocalDiagnostics; 523var analyzerTelemetryInfo = GetTelemetryInfo(analyzers); 533private static ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> GetImmutable<TKey>( 541return ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>.Empty; 544var builder = ImmutableDictionary.CreateBuilder<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>(); 575private static ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> GetImmutable( 582return ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>.Empty; 601private ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> GetTelemetryInfo(
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
1076ImmutableDictionary<Diagnostic, ProgrammaticSuppressionInfo> programmaticSuppressionsByDiagnostic = createProgrammaticSuppressionsByDiagnosticMap(_programmaticSuppressions); 1162static ImmutableDictionary<Diagnostic, ProgrammaticSuppressionInfo> createProgrammaticSuppressionsByDiagnosticMap(ConcurrentSet<Suppression> programmaticSuppressions) 1460internal ImmutableDictionary<DiagnosticAnalyzer, TimeSpan> AnalyzerExecutionTimes => AnalyzerExecutor.AnalyzerExecutionTimes;
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
229internal ImmutableDictionary<DiagnosticAnalyzer, TimeSpan> AnalyzerExecutionTimes
DiagnosticAnalyzer\AnalyzerFileReference.cs (2)
378private ImmutableDictionary<string, ImmutableArray<TExtension>> _lazyExtensionsPerLanguage; 389_lazyExtensionsPerLanguage = ImmutableDictionary<string, ImmutableArray<TExtension>>.Empty;
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (2)
25private static ImmutableDictionary<LocalizableString, Exception?> s_localizableStringToException = ImmutableDictionary<LocalizableString, Exception?>.Empty.WithComparers(ReferenceEqualityComparer.Instance);
DiagnosticAnalyzer\AnalyzerManager.cs (1)
358var diagnosticOptions = options.SpecificDiagnosticOptions;
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (3)
730(var analyzerActionCounts, var hasAnyActionsRequiringCompilationEvents) = await getAnalyzerActionCountsAsync( 827static async Task<(ImmutableDictionary<DiagnosticAnalyzer, AnalyzerActionCounts> analyzerActionCounts, bool hasAnyActionsRequiringCompilationEvents)> getAnalyzerActionCountsAsync( 852ImmutableDictionary<DiagnosticAnalyzer, AnalyzerActionCounts> analyzerActionCounts)
DiagnosticAnalyzer\CompilerAnalyzerConfigOptionsProvider.cs (4)
11private readonly ImmutableDictionary<object, AnalyzerConfigOptions> _treeDict; 15ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, 19ImmutableDictionary<object, AnalyzerConfigOptions> treeDict, 34internal CompilerAnalyzerConfigOptionsProvider WithAdditionalTreeOptions(ImmutableDictionary<object, AnalyzerConfigOptions> treeDict)
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (8)
17private static readonly ImmutableDictionary<string, string?> s_syntactic = ImmutableDictionary<string, string?>.Empty.Add(Origin, Syntactic); 18private static readonly ImmutableDictionary<string, string?> s_declaration = ImmutableDictionary<string, string?>.Empty.Add(Origin, Declaration); 63ImmutableDictionary<string, string?>? properties = null) 79private readonly ImmutableDictionary<string, string?> _properties; 81public CompilerDiagnostic(Diagnostic original, ImmutableDictionary<string, string?> properties) 100public override ImmutableDictionary<string, string?> Properties => _properties;
DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (3)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer); 19internal readonly ImmutableDictionary<string, string> Options; 21public DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string> options)
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (5)
34private readonly ConcurrentDictionary<ISymbol, ImmutableDictionary<string, SuppressMessageInfo>> _localSuppressionsBySymbol; 131_localSuppressionsBySymbol = new ConcurrentDictionary<ISymbol, ImmutableDictionary<string, SuppressMessageInfo>>(); 250var suppressions = _localSuppressionsBySymbol.GetOrAdd(symbol, this.DecodeLocalSuppressMessageAttributes); 306private ImmutableDictionary<string, SuppressMessageInfo> DecodeLocalSuppressMessageAttributes(ISymbol symbol) 312private static ImmutableDictionary<string, SuppressMessageInfo> DecodeLocalSuppressMessageAttributes(IEnumerable<AttributeData> attributes)
Emit\CommonPEModuleBuilder.cs (2)
176internal abstract ImmutableDictionary<ISymbolInternal, ImmutableArray<ISymbolInternal>> GetAllSynthesizedMembers(); 1064internal override ImmutableDictionary<ISymbolInternal, ImmutableArray<ISymbolInternal>> GetAllSynthesizedMembers()
Emit\EditAndContinue\DefinitionMap.cs (3)
41private readonly ImmutableDictionary<IMethodSymbolInternal, MethodInstrumentation> _methodInstrumentations; 47private ImmutableDictionary<INamedTypeSymbolInternal, MetadataLambdasAndClosures> _metadataLambdasAndClosures 48= ImmutableDictionary<INamedTypeSymbolInternal, MetadataLambdasAndClosures>.Empty;
Emit\EditAndContinue\EmitBaseline.cs (2)
70ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> assemblyReferenceIdentityMap) 79public readonly ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> AssemblyReferenceIdentityMap = assemblyReferenceIdentityMap;
InternalUtilities\Hash.cs (1)
77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
InternalUtilities\ImmutableSetWithInsertionOrder`1.cs (5)
17private readonly ImmutableDictionary<T, uint> _map; 20private ImmutableSetWithInsertionOrder(ImmutableDictionary<T, uint> map, uint nextElementValue) 49ImmutableDictionary<T, uint>.Builder? builder = null; 84var modifiedMap = _map.Remove(value); 96ImmutableDictionary<T, uint>.Builder? builder = null;
Operations\ControlFlowGraph.cs (4)
27private readonly ImmutableDictionary<IMethodSymbol, (ControlFlowRegion region, ILocalFunctionOperation operation, int ordinal)> _localFunctionsMap; 29private readonly ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion region, int ordinal)> _anonymousFunctionsMap; 37ImmutableDictionary<IMethodSymbol, (ControlFlowRegion region, ILocalFunctionOperation operation, int ordinal)> localFunctionsMap, 38ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion region, int ordinal)> anonymousFunctionsMap)
Operations\ControlFlowGraphBuilder.cs (2)
151ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion, int)>.Builder? anonymousFunctionsMapOpt = null; 169anonymousFunctionsMapOpt?.ToImmutable() ?? ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion, int)>.Empty);
Operations\ControlFlowGraphBuilder.RegionBuilder.cs (7)
298ImmutableDictionary<IMethodSymbol, (ControlFlowRegion region, ILocalFunctionOperation operation, int ordinal)>.Builder localFunctionsMap, 299ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion region, int ordinal)>.Builder? anonymousFunctionsMapOpt, 383(ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion region, int ordinal)>.Builder map, ControlFlowRegion region) argument = (anonymousFunctionsMapOpt, result); 399OperationVisitor<(ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion region, int ordinal)>.Builder map, ControlFlowRegion region), IOperation> 405(ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion region, int ordinal)>.Builder map, ControlFlowRegion region) argument) 411internal override IOperation? VisitNoneOperation(IOperation operation, (ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion region, int ordinal)>.Builder map, ControlFlowRegion region) argument) 418(ImmutableDictionary<IFlowAnonymousFunctionOperation, (ControlFlowRegion region, int ordinal)>.Builder map, ControlFlowRegion region) argument)
ReferenceManager\CommonReferenceManager.Binding.cs (3)
105ref ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> implicitReferenceResolutions, 222ref ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> implicitReferenceResolutions, 527ref ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> implicitReferenceResolutions,
ReferenceManager\CommonReferenceManager.State.cs (10)
48internal abstract ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> ImplicitReferenceResolutions { get; } 132private ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?>? _lazyImplicitReferenceResolutions; 188private ImmutableDictionary<MetadataReference, ImmutableArray<MetadataReference>>? _lazyMergedAssemblyReferencesMap; 259internal override ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> ImplicitReferenceResolutions 324internal ImmutableDictionary<MetadataReference, ImmutableArray<MetadataReference>> MergedAssemblyReferencesMap 414ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> implicitReferenceResolutions, 444_lazyMergedAssemblyReferencesMap = mergedAssemblyReferencesMapOpt?.ToImmutableDictionary() ?? ImmutableDictionary<MetadataReference, ImmutableArray<MetadataReference>>.Empty; 542internal static ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> GetAssemblyReferenceIdentityBaselineMap(ImmutableArray<TAssemblySymbol> symbols, ImmutableArray<AssemblyIdentity> originalIdentities) 546ImmutableDictionary<AssemblyIdentity, AssemblyIdentity>.Builder? lazyBuilder = null; 576return lazyBuilder?.ToImmutable() ?? ImmutableDictionary<AssemblyIdentity, AssemblyIdentity>.Empty;
RuleSet\RuleSet.cs (4)
38private readonly ImmutableDictionary<string, ReportDiagnostic> _specificDiagnosticOptions; 42public ImmutableDictionary<string, ReportDiagnostic> SpecificDiagnosticOptions 59public RuleSet(string filePath, ReportDiagnostic generalOption, ImmutableDictionary<string, ReportDiagnostic> specificOptions, ImmutableArray<RuleSetInclude> includes) 63_specificDiagnosticOptions = specificOptions == null ? ImmutableDictionary<string, ReportDiagnostic>.Empty : specificOptions;
SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
SourceGeneration\GeneratorDriver.cs (1)
437(var sources, var generatorDiagnostics, var generatorRunStateTable, var hostOutputs) = context.ToImmutableAndFree();
SourceGeneration\GeneratorState.cs (18)
27ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 28ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 29ImmutableDictionary<string, object>.Empty, 52ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 53ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 54ImmutableDictionary<string, object>.Empty, 68ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> executedSteps, 69ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps, 70ImmutableDictionary<string, object> hostOutputs, 108ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> executedSteps, 109ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps, 110ImmutableDictionary<string, object> hostOutputs, 138ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 139ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 140ImmutableDictionary<string, object>.Empty, 163internal ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> ExecutedSteps { get; } 165internal ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> OutputSteps { get; } 167internal ImmutableDictionary<string, object> HostOutputs { get; }
SourceGeneration\IncrementalContexts.cs (2)
431internal readonly ImmutableDictionary<string, object>.Builder HostOutputBuilder; 442internal (ImmutableArray<GeneratedSourceText> sources, ImmutableArray<Diagnostic> diagnostics, GeneratorRunStateTable executedSteps, ImmutableDictionary<string, object> hostOutputs) ToImmutableAndFree()
SourceGeneration\Nodes\GeneratorRunStateTable.cs (7)
15private GeneratorRunStateTable(ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> executedSteps, ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps) 21public ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> ExecutedSteps { get; } 23public ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> OutputSteps { get; } 57private static ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> StepCollectionToImmutable(Dictionary<string, HashSet<IncrementalGeneratorRunStep>>? builder) 61return ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty; 64ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Builder resultBuilder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<IncrementalGeneratorRunStep>>();
SourceGeneration\RunResults.cs (6)
85ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> namedSteps, 86ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps, 87ImmutableDictionary<string, object> hostOutputs, 128public ImmutableDictionary<string, object> HostOutputs { get; } 154public ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> TrackedSteps { get; } 162public ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> TrackedOutputSteps { get; }
SourceGeneration\SyntaxStore.cs (2)
31private readonly ImmutableDictionary<SyntaxInputNode, Exception>.Builder _syntaxExceptions = ImmutableDictionary.CreateBuilder<SyntaxInputNode, Exception>(); 32private readonly ImmutableDictionary<SyntaxInputNode, TimeSpan>.Builder _syntaxTimes = ImmutableDictionary.CreateBuilder<SyntaxInputNode, TimeSpan>();
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (2)
903public static ImmutableDictionary<string, string> GetCompilationOptions(this MetadataReader pdbReader) 907return ImmutableDictionary<string, string>.Empty;
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
687public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 698public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
Syntax\AbstractWarningStateMap.cs (2)
73public readonly ImmutableDictionary<string, TWarningState> SpecificWarningOption; 82public WarningStateMapEntry(int position, TWarningState general, ImmutableDictionary<string, TWarningState> specific)
Syntax\SyntaxTree.cs (3)
27protected internal static readonly ImmutableDictionary<string, ReportDiagnostic> EmptyDiagnosticOptions = 84public virtual ImmutableDictionary<string, ReportDiagnostic> DiagnosticOptions => EmptyDiagnosticOptions; 407public virtual SyntaxTree WithDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic> options)
Microsoft.CodeAnalysis.Analyzers (151)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (6)
70private static readonly ImmutableDictionary<string, string?> s_EqualityRuleProperties = 73private static readonly ImmutableDictionary<string, string?> s_GetHashCodeRuleProperties = 76private static readonly ImmutableDictionary<string, string?> s_CollectionRuleProperties = 103var equalityComparerMethods = GetEqualityComparerMethodsToCheck(compilation); 170ImmutableDictionary<string, ImmutableHashSet<INamedTypeSymbol>> equalityComparerMethods, 326private static ImmutableDictionary<string, ImmutableHashSet<INamedTypeSymbol>> GetEqualityComparerMethodsToCheck(Compilation compilation)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (5)
32using PooledResourcesDataValueConcurrentDictionary = PooledConcurrentDictionary<string, ImmutableDictionary<string, (string value, Location location)>>; 225out ImmutableDictionary<string, ImmutableArray<(string? prefix, int start, int end)>>? categoryAndAllowedIdsMap, 675var properties = ImmutableDictionary<string, string?>.Empty.Add(DefineDescriptorArgumentCorrectlyFixValue, fixValue); 851var map = GetOrCreateResourceMap(options, resourceFileName, resourceDataValueMap, cancellationToken);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (3)
141ImmutableDictionary<string, ImmutableArray<(string? prefix, int start, int end)>>? categoryAndAllowedIdsInfoMap, 198[NotNullWhen(returnValue: true)] out ImmutableDictionary<string, ImmutableArray<(string? prefix, int start, int end)>>? categoryAndAllowedIdsMap, 231[NotNullWhen(returnValue: true)] out ImmutableDictionary<string, ImmutableArray<(string? prefix, int start, int end)>>? categoryAndAllowedIdsInfoMap,
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (4)
289var properties = ImmutableDictionary<string, string?>.Empty.Add( 326var properties = ImmutableDictionary<string, string?>.Empty.Add(propertyName, newEntry);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ResourceStringsFormat.cs (6)
19using PooledResourcesDataValueConcurrentDictionary = PooledConcurrentDictionary<string, ImmutableDictionary<string, (string value, Location location)>>; 36private static ImmutableDictionary<string, (string value, Location location)> GetOrCreateResourceMap( 46if (resourceMap.TryGetValue(resourceFileName, out var map)) 55private static ImmutableDictionary<string, (string value, Location location)> CreateResourceMap(AnalyzerOptions options, string resourceFileName, CancellationToken cancellationToken) 66return ImmutableDictionary<string, (string value, Location location)>.Empty; 68static ImmutableDictionary<string, (string value, Location location)> CreateResourceMapForFile(AdditionalText file, CancellationToken cancellationToken)
MetaAnalyzers\ReportDiagnosticAnalyzer.cs (2)
119private ImmutableDictionary<INamedTypeSymbol, ImmutableArray<IFieldSymbol>> _supportedDescriptorFieldsMap; 127_supportedDescriptorFieldsMap = ImmutableDictionary<INamedTypeSymbol, ImmutableArray<IFieldSymbol>>.Empty;
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (3)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer); 19internal readonly ImmutableDictionary<string, string> Options; 21public DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
687public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 698public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (10)
27ImmutableDictionary<string, string?>? properties, 35ImmutableDictionary<string, string?>? properties, 54ImmutableDictionary<string, string?>? properties, 64ImmutableDictionary<string, string?>? properties, 89ImmutableDictionary<string, string?>? properties, 102properties: ImmutableDictionary<string, string?>.Empty, 108ImmutableDictionary<string, string?>? properties, 116ImmutableDictionary<string, string?>? properties, 143ImmutableDictionary<string, string?>? properties, 169ImmutableDictionary<string, string?>? properties,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
70internal static int Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary) 78internal static void Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary, ref RoslynHashCode hashCode)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
31ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty); 34private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions; 36private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (19)
31private readonly ImmutableDictionary<string, TValue> _names; 32private readonly ImmutableDictionary<ISymbol, TValue> _symbols; 54private readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> _wildcardNamesBySymbolKind; 63private SymbolNamesWithValueOption(ImmutableDictionary<string, TValue> names, ImmutableDictionary<ISymbol, TValue> symbols, 64ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> wildcardNamesBySymbolKind) 75_names = ImmutableDictionary<string, TValue>.Empty; 76_symbols = ImmutableDictionary<ISymbol, TValue>.Empty; 77_wildcardNamesBySymbolKind = ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>>.Empty; 310if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 320if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 330if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) && 373internal ref readonly ImmutableDictionary<string, TValue> Names => ref _symbolNamesWithValueOption._names; 375internal ref readonly ImmutableDictionary<ISymbol, TValue> Symbols => ref _symbolNamesWithValueOption._symbols; 377internal ref readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> WildcardNamesBySymbolKind => ref _symbolNamesWithValueOption._wildcardNamesBySymbolKind;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (5)
20private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new(); 36var optionsMap = TryGetBackingOptionsDictionary(analyzerConfigOptions); 50static ImmutableDictionary<string, string>? TryGetBackingOptionsDictionary(AnalyzerConfigOptions analyzerConfigOptions) 56return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 57type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (3)
19public ImmutableDictionary<TKey, TValue> ToImmutableDictionaryAndFree<TKey, TValue>( 23ImmutableDictionary<TKey, TValue> result; 26result = ImmutableDictionary<TKey, TValue>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (3)
40public static ImmutableDictionary<CaptureId, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg) 49ImmutableDictionary<CaptureId, FlowCaptureKind>.Builder lvalueFlowCaptureIdBuilder = null; 80return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<CaptureId, FlowCaptureKind>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
197public ImmutableDictionary<CaptureId, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
13ImmutableDictionary<(ISymbol symbol, IOperation write), bool> symbolWritesMap, 33public ImmutableDictionary<(ISymbol symbol, IOperation write), bool> SymbolWritesMap { get; } = symbolWritesMap;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (5)
57var serializedNameMap = AssignNamesToNamingStyleElements(symbolSpecifications, namingStyles); 58var ruleNameMap = AssignNamesToNamingStyleRules(rules, serializedNameMap); 119private static ImmutableDictionary<Guid, string> AssignNamesToNamingStyleElements( 170private static ImmutableDictionary<NamingRule, string> AssignNamesToNamingStyleRules(ImmutableArray<NamingRule> namingRules, ImmutableDictionary<Guid, string> serializedNameMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
113=> CreateSerializerForEnum(map, ImmutableDictionary<string, T>.Empty); 119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum 130var alternativeMap = ImmutableDictionary<string, T>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 35!treeMap.TryGetValue((semanticModel.SyntaxTree, namespaceId), out var symbolMap))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (4)
20private readonly ImmutableDictionary<TKey, TValue> _forwardMap; 21private readonly ImmutableDictionary<TValue, TKey> _backwardMap; 35private BidirectionalMap(ImmutableDictionary<TKey, TValue> forwardMap, ImmutableDictionary<TValue, TKey> backwardMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\ImmutableDictionaryExtensions.cs (2)
12public static bool KeysEqual<TKey, TValue>(this ImmutableDictionary<TKey, TValue> self, ImmutableDictionary<TKey, TValue> other)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
158public static ImmutableDictionary<TKey, ImmutableHashSet<TValue>> MultiRemove<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (4)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 41return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty.SetItem(document, documentDiagnostics); 106return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty; 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
41ImmutableDictionary<string, string?> properties,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (1)
32var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(fixAllContext).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
284ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewFieldMap, bool isContainedInUnsafeType) 306ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewPropertyMap, bool isContainedInUnsafeType)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
484ImmutableDictionary<string, ISymbol>? parameterToExistingMemberMap, 485ImmutableDictionary<string, string>? parameterToNewMemberMap,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
18private static readonly ImmutableDictionary<BinaryOperatorKind, BinaryOperatorKind> s_negatedBinaryMap =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (9)
59private ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> _semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 73var map = _semanticModelMap; 82_semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 113var originalMap = _semanticModelMap; 125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 138ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map, Document document, SyntaxNode bodyNode, CancellationToken cancellationToken) 175ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (2)
25private ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 26= ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (6)
27private ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 28= ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)>.Empty; 34private ImmutableDictionary<string, MefLanguageServices> _languageServicesMap 35= ImmutableDictionary<string, MefLanguageServices>.Empty; 74var allLanguageServices = Interlocked.Exchange(ref _languageServicesMap, _languageServicesMap.Clear()); 177var currentServicesMap = _languageServicesMap;
Microsoft.CodeAnalysis.AnalyzerUtilities (223)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (3)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer); 19internal readonly ImmutableDictionary<string, string> Options; 21public DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
687public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 698public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (10)
27ImmutableDictionary<string, string?>? properties, 35ImmutableDictionary<string, string?>? properties, 54ImmutableDictionary<string, string?>? properties, 64ImmutableDictionary<string, string?>? properties, 89ImmutableDictionary<string, string?>? properties, 102properties: ImmutableDictionary<string, string?>.Empty, 108ImmutableDictionary<string, string?>? properties, 116ImmutableDictionary<string, string?>? properties, 143ImmutableDictionary<string, string?>? properties, 169ImmutableDictionary<string, string?>? properties,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
70internal static int Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary) 78internal static void Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary, ref RoslynHashCode hashCode)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
31ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty); 34private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions; 36private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (19)
31private readonly ImmutableDictionary<string, TValue> _names; 32private readonly ImmutableDictionary<ISymbol, TValue> _symbols; 54private readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> _wildcardNamesBySymbolKind; 63private SymbolNamesWithValueOption(ImmutableDictionary<string, TValue> names, ImmutableDictionary<ISymbol, TValue> symbols, 64ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> wildcardNamesBySymbolKind) 75_names = ImmutableDictionary<string, TValue>.Empty; 76_symbols = ImmutableDictionary<ISymbol, TValue>.Empty; 77_wildcardNamesBySymbolKind = ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>>.Empty; 310if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 320if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 330if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) && 373internal ref readonly ImmutableDictionary<string, TValue> Names => ref _symbolNamesWithValueOption._names; 375internal ref readonly ImmutableDictionary<ISymbol, TValue> Symbols => ref _symbolNamesWithValueOption._symbols; 377internal ref readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> WildcardNamesBySymbolKind => ref _symbolNamesWithValueOption._wildcardNamesBySymbolKind;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (5)
20private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new(); 36var optionsMap = TryGetBackingOptionsDictionary(analyzerConfigOptions); 50static ImmutableDictionary<string, string>? TryGetBackingOptionsDictionary(AnalyzerConfigOptions analyzerConfigOptions) 56return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 57type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (3)
19public ImmutableDictionary<TKey, TValue> ToImmutableDictionaryAndFree<TKey, TValue>( 23ImmutableDictionary<TKey, TValue> result; 26result = ImmutableDictionary<TKey, TValue>.Empty;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CopyDataFlowOperationVisitor.cs (1)
576ImmutableDictionary<IParameterSymbol, ArgumentInfo<CopyAbstractValue>> argumentValuesMap,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyBlockAnalysisResult.cs (2)
18Data = blockAnalysisData?.CoreAnalysisData.ToImmutableDictionary() ?? ImmutableDictionary<AnalysisEntity, CopyAbstractValue>.Empty; 22public ImmutableDictionary<AnalysisEntity, CopyAbstractValue> Data { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.cs (1)
126var trackedInstanceFieldPointsToMap = analysisContext.TrackInstanceFields ?
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (1)
47public ImmutableDictionary<IFieldSymbol, PointsToAbstractValue> TrackedInstanceFieldPointsToMap
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisResult.cs (2)
16ImmutableDictionary<IFieldSymbol, PointsToAnalysis.PointsToAbstractValue>? trackedInstanceFieldPointsToMap) 22public ImmutableDictionary<IFieldSymbol, PointsToAnalysis.PointsToAbstractValue>? TrackedInstanceFieldPointsToMap { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeBlockAnalysisResult.cs (2)
20Data = blockAnalysisData?.ToImmutableDictionary() ?? ImmutableDictionary<AbstractLocation, DisposeAbstractValue>.Empty; 23public ImmutableDictionary<AbstractLocation, DisposeAbstractValue> Data { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\GlobalFlowStateAnalysis\GlobalFlowStateBlockAnalysisResult.cs (2)
20Data = blockAnalysisData?.ToImmutableDictionary() ?? ImmutableDictionary<AnalysisEntity, GlobalFlowStateAnalysisValueSet>.Empty; 23public ImmutableDictionary<AnalysisEntity, GlobalFlowStateAnalysisValueSet> Data { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\GlobalFlowStateAnalysis\GlobalFlowStateDataFlowOperationVisitor.cs (3)
30private readonly ImmutableDictionary<IOperation, TAbstractAnalysisValue>.Builder _globalValuesMapBuilder; 45internal ImmutableDictionary<IOperation, TAbstractAnalysisValue> GetGlobalValuesMap() 149ImmutableDictionary<IParameterSymbol, ArgumentInfo<TAbstractAnalysisValue>> argumentValuesMap,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysis.cs (4)
30public static ImmutableDictionary<IParameterSymbol, SyntaxNode> GetOrComputeHazardousParameterUsages( 46return ImmutableDictionary<IParameterSymbol, SyntaxNode>.Empty; 58private static ImmutableDictionary<IParameterSymbol, SyntaxNode> GetOrComputeHazardousParameterUsages( 82return ImmutableDictionary<IParameterSymbol, SyntaxNode>.Empty;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (4)
28private readonly ImmutableDictionary<IParameterSymbol, SyntaxNode>.Builder? _hazardousParameterUsageBuilder; 45public ImmutableDictionary<IParameterSymbol, SyntaxNode> HazardousParameterUsages 321var hazardousParameterUsagesInInvokedMethod = invokedMethodAnalysisResult.HazardousParameterUsages; 367var hazardousParameterUsagesInInvokedMethod = invokedMethodAnalysisResult.HazardousParameterUsages;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysisResult.cs (2)
16ImmutableDictionary<IParameterSymbol, SyntaxNode> hazardousParameterUsages) 22public ImmutableDictionary<IParameterSymbol, SyntaxNode> HazardousParameterUsages { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationBlockAnalysisResult.cs (2)
20Data = blockAnalysisData?.ToImmutableDictionary() ?? ImmutableDictionary<AbstractLocation, ParameterValidationAbstractValue>.Empty; 23public ImmutableDictionary<AbstractLocation, ParameterValidationAbstractValue> Data { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\DefaultPointsToValueGenerator.cs (1)
17private readonly ImmutableDictionary<AnalysisEntity, PointsToAbstractValue>.Builder _defaultPointsToValueMapBuilder;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (6)
53public ImmutableDictionary<IOperation, ImmutableHashSet<AbstractLocation>> GetEscapedLocationsThroughOperationsMap() 56public ImmutableDictionary<IOperation, ImmutableHashSet<AbstractLocation>> GetEscapedLocationsThroughReturnValuesMap() 59public ImmutableDictionary<AnalysisEntity, ImmutableHashSet<AbstractLocation>> GetEscapedLocationsThroughEntitiesMap() 62private static ImmutableDictionary<T, ImmutableHashSet<AbstractLocation>> GetEscapedAbstractLocationsMapAndFreeBuilder<T>( 70return ImmutableDictionary<T, ImmutableHashSet<AbstractLocation>>.Empty; 612ImmutableDictionary<IParameterSymbol, ArgumentInfo<PointsToAbstractValue>> argumentValuesMap,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisResult.cs (7)
14private readonly ImmutableDictionary<IOperation, ImmutableHashSet<AbstractLocation>> _escapedLocationsThroughOperationsMap; 15private readonly ImmutableDictionary<IOperation, ImmutableHashSet<AbstractLocation>> _escapedLocationsThroughReturnValuesMap; 16private readonly ImmutableDictionary<AnalysisEntity, ImmutableHashSet<AbstractLocation>> _escapedLocationsThroughEntitiesMap; 22ImmutableDictionary<IOperation, ImmutableHashSet<AbstractLocation>> escapedLocationsThroughOperationsMap, 23ImmutableDictionary<IOperation, ImmutableHashSet<AbstractLocation>> escapedLocationsThroughReturnValuesMap, 24ImmutableDictionary<AnalysisEntity, ImmutableHashSet<AbstractLocation>> escapedLocationsThroughEntitiesMap, 47ImmutableDictionary<TKey, ImmutableHashSet<AbstractLocation>> map)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToBlockAnalysisResult.cs (2)
18Data = blockAnalysisData?.CoreAnalysisData.ToImmutableDictionary() ?? ImmutableDictionary<AnalysisEntity, PointsToAbstractValue>.Empty; 22public ImmutableDictionary<AnalysisEntity, PointsToAbstractValue> Data { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\HazardousUsageEvaluatorCollection.cs (2)
49private ImmutableDictionary<(HazardousUsageEvaluatorKind Kind, string? InstanceTypeName, string? MethodName, string? ParameterName, bool DerivedClasses), HazardousUsageEvaluator> HazardousUsageEvaluators { get; } 104internal ImmutableDictionary<(INamedTypeSymbol, bool), string> GetTypeToNameMapping(WellKnownTypeProvider wellKnownTypeProvider)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertyMapperCollection.cs (2)
58ImmutableDictionary<string, (int Index, PropertyMapper PropertyMapper)>.Builder builder = ImmutableDictionary.CreateBuilder<string, (int Index, PropertyMapper PropertyMapper)>(StringComparer.Ordinal); 80private ImmutableDictionary<string, (int Index, PropertyMapper PropertyMapper)> PropertyMappersWithIndex { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (2)
38private readonly ImmutableDictionary<(Location Location, IMethodSymbol? Method), HazardousUsageEvaluationResult>.Builder _hazardousUsageBuilder; 86public ImmutableDictionary<(Location Location, IMethodSymbol? Method), HazardousUsageEvaluationResult> HazardousUsages => this._hazardousUsageBuilder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisContext.cs (2)
45ImmutableDictionary<(INamedTypeSymbol, bool), string> hazardousUsageTypesToNames) 158public ImmutableDictionary<(INamedTypeSymbol, bool), string> HazardousUsageTypesToNames { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisResult.cs (2)
19ImmutableDictionary<(Location Location, IMethodSymbol? Method), HazardousUsageEvaluationResult> hazardousUsages, 30public ImmutableDictionary<(Location Location, IMethodSymbol? Method), HazardousUsageEvaluationResult> HazardousUsages { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetBlockAnalysisResult.cs (2)
22Data = blockAnalysisData?.ToImmutableDictionary() ?? ImmutableDictionary<AbstractLocation, PropertySetAbstractValue>.Empty; 25public ImmutableDictionary<AbstractLocation, PropertySetAbstractValue> Data { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\PooledHashSetExtensions.cs (1)
55?? ImmutableDictionary<string, ImmutableHashSet<string>>.Empty);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\SinkInfo.cs (2)
18public SinkInfo(string fullTypeName, ImmutableHashSet<SinkKind> sinkKinds, bool isInterface, bool isAnyStringParameterInConstructorASink, ImmutableHashSet<string> sinkProperties, ImmutableDictionary<string, ImmutableHashSet<string>> sinkMethodParameters) 56public ImmutableDictionary<string, ImmutableHashSet<string>> SinkMethodParameters { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataBlockAnalysisResult.cs (2)
16public ImmutableDictionary<AnalysisEntity, TaintedDataAbstractValue> Data { get; } 21Data = blockAnalysisData?.CoreAnalysisData.ToImmutableDictionary() ?? ImmutableDictionary<AnalysisEntity, TaintedDataAbstractValue>.Empty;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataConfig.cs (10)
33private static ImmutableDictionary<SinkKind, ImmutableHashSet<SourceInfo>> s_sinkKindToSourceInfo 39private static ImmutableDictionary<SinkKind, ImmutableHashSet<SanitizerInfo>> s_sinkKindToSanitizerInfo 45private static ImmutableDictionary<SinkKind, bool> s_sinkKindHasTaintArraySource 58private ImmutableDictionary<SinkKind, Lazy<TaintedDataSymbolMap<SourceInfo>>> SourceSymbolMap { get; } 63private ImmutableDictionary<SinkKind, Lazy<TaintedDataSymbolMap<SanitizerInfo>>> SanitizerSymbolMap { get; } 68private ImmutableDictionary<SinkKind, Lazy<TaintedDataSymbolMap<SinkInfo>>> SinkSymbolMap { get; } 82ImmutableDictionary<SinkKind, Lazy<TaintedDataSymbolMap<SourceInfo>>> sourceSymbolMap, 83ImmutableDictionary<SinkKind, Lazy<TaintedDataSymbolMap<SanitizerInfo>>> sanitizerSymbolMap, 84ImmutableDictionary<SinkKind, Lazy<TaintedDataSymbolMap<SinkInfo>>> sinkSymbolMap) 191private TaintedDataSymbolMap<T> GetFromMap<T>(SinkKind sinkKind, ImmutableDictionary<SinkKind, Lazy<TaintedDataSymbolMap<T>>> map)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataSymbolMap.cs (4)
46ImmutableDictionary<ITypeSymbol, TInfo>.Builder concreteInfosBuilder = ImmutableDictionary.CreateBuilder<ITypeSymbol, TInfo>(); 47ImmutableDictionary<ITypeSymbol, TInfo>.Builder interfaceInfosBuilder = ImmutableDictionary.CreateBuilder<ITypeSymbol, TInfo>(); 86private ImmutableDictionary<ITypeSymbol, TInfo> ConcreteInfos { get; } 91private ImmutableDictionary<ITypeSymbol, TInfo> InterfaceInfos { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentBlockAnalysisResult.cs (2)
18Data = blockAnalysisData?.CoreAnalysisData.ToImmutableDictionary() ?? ImmutableDictionary<AnalysisEntity, ValueContentAbstractValue>.Empty; 22public ImmutableDictionary<AnalysisEntity, ValueContentAbstractValue> Data { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AbstractLocationDataFlowOperationVisitor.cs (1)
134=> GetClonedAnalysisDataHelper(ImmutableDictionary<AbstractLocation, TAbstractAnalysisValue>.Empty);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AddressSharedEntitiesProvider.cs (3)
27private readonly ImmutableDictionary<AnalysisEntity, CopyAbstractValue>.Builder _addressSharedEntitiesBuilder; 35public void SetAddressSharedEntities(ImmutableDictionary<AnalysisEntity, CopyAbstractValue>? addressSharedEntities) 107public ImmutableDictionary<AnalysisEntity, CopyAbstractValue> GetAddressedSharedEntityMap()
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (2)
172protected sealed override void StopTrackingDataForParameters(ImmutableDictionary<IParameterSymbol, AnalysisEntity> parameterEntities) 468ImmutableDictionary<IParameterSymbol, ArgumentInfo<TAbstractAnalysisValue>> argumentValuesMap,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (1)
53ImmutableDictionary<ISymbol, PointsToAbstractValue>? interproceduralCapturedVariablesMap,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResult.cs (11)
25private readonly ImmutableDictionary<BasicBlock, TBlockAnalysisResult> _basicBlockStateMap; 26private readonly ImmutableDictionary<IOperation, TAbstractAnalysisValue> _operationStateMap; 27private readonly ImmutableDictionary<IOperation, PredicateValueKind> _predicateValueKindMap; 28private readonly ImmutableDictionary<IOperation, IDataFlowAnalysisResult<TAbstractAnalysisValue>> _interproceduralResultsMap; 29private readonly ImmutableDictionary<IMethodSymbol, IDataFlowAnalysisResult<TAbstractAnalysisValue>> _standaloneLocalFunctionAnalysisResultsMap; 34ImmutableDictionary<BasicBlock, TBlockAnalysisResult> basicBlockStateMap, 35ImmutableDictionary<IOperation, TAbstractAnalysisValue> operationStateMap, 36ImmutableDictionary<IOperation, PredicateValueKind> predicateValueKindMap, 38ImmutableDictionary<IOperation, IDataFlowAnalysisResult<TAbstractAnalysisValue>> interproceduralResultsMap, 39ImmutableDictionary<IMethodSymbol, IDataFlowAnalysisResult<TAbstractAnalysisValue>> standaloneLocalFunctionAnalysisResultsMap, 87internal DataFlowAnalysisResult<TBlockAnalysisResult, TAbstractAnalysisValue> With(ImmutableDictionary<IOperation, TAbstractAnalysisValue> operationStateMap)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (4)
46ImmutableDictionary<IOperation, TAbstractAnalysisValue> stateMap, 47ImmutableDictionary<IOperation, PredicateValueKind> predicateValueKindMap, 49ImmutableDictionary<IOperation, IDataFlowAnalysisResult<TAbstractAnalysisValue>> interproceduralResultsMap, 50ImmutableDictionary<IMethodSymbol, IDataFlowAnalysisResult<TAbstractAnalysisValue>> standaloneLocalFunctionAnalysisResultsMap,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (26)
47private readonly ImmutableDictionary<IOperation, TAbstractAnalysisValue>.Builder _valueCacheBuilder; 48private readonly ImmutableDictionary<IOperation, PredicateValueKind>.Builder _predicateValueKindCacheBuilder; 54private ImmutableDictionary<IParameterSymbol, AnalysisEntity>? _lazyParameterEntities; 118private readonly ImmutableDictionary<IOperation, IDataFlowAnalysisResult<TAbstractAnalysisValue>>.Builder _interproceduralResultsBuilder; 123private readonly ImmutableDictionary<IMethodSymbol, IDataFlowAnalysisResult<TAbstractAnalysisValue>>.Builder _standaloneLocalFunctionAnalysisResultsBuilder; 152public ImmutableDictionary<IOperation, IDataFlowAnalysisResult<TAbstractAnalysisValue>> InterproceduralResultsMap => _interproceduralResultsBuilder.ToImmutable(); 153public ImmutableDictionary<IMethodSymbol, IDataFlowAnalysisResult<TAbstractAnalysisValue>> StandaloneLocalFunctionAnalysisResultsMap => _standaloneLocalFunctionAnalysisResultsBuilder.ToImmutable(); 537protected virtual void StopTrackingDataForParameters(ImmutableDictionary<IParameterSymbol, AnalysisEntity> parameterEntities) 558var argumentValuesMap = DataFlowAnalysisContext.InterproceduralAnalysisData?.ArgumentValuesMap ?? 559ImmutableDictionary<IParameterSymbol, ArgumentInfo<TAbstractAnalysisValue>>.Empty; 1019internal ImmutableDictionary<IOperation, TAbstractAnalysisValue> GetStateMap() => _valueCacheBuilder.ToImmutable(); 1021internal ImmutableDictionary<IOperation, PredicateValueKind> GetPredicateValueKindMap() => _predicateValueKindCacheBuilder.ToImmutable(); 1157var outputData = DataFlowAnalysisContext.PointsToAnalysisResult.EntryBlockOutput.Data; 1164var inputData = DataFlowAnalysisContext.PointsToAnalysisResult[CurrentBasicBlock].Data; 1178var inputData = DataFlowAnalysisContext.PointsToAnalysisResult.MergedStateForUnhandledThrowOperations?.Data; 2130ImmutableDictionary<IParameterSymbol, ArgumentInfo<TAbstractAnalysisValue>> argumentValuesMap, 2437var argumentValuesMap = GetArgumentValues(ref invocationInstance); 2438var pointsToValues = pointsToAnalysisResult?[cfg.GetEntry()].Data; 2439var copyValues = copyAnalysisResult?[cfg.GetEntry()].Data; 2440var valueContentValues = valueContentAnalysisResult?[cfg.GetEntry()].Data; 2499ImmutableDictionary<IParameterSymbol, ArgumentInfo<TAbstractAnalysisValue>> GetArgumentValues(ref (AnalysisEntity? entity, PointsToAbstractValue pointsToValue)? invocationInstance) 2594private ImmutableDictionary<ISymbol, PointsToAbstractValue> GetCapturedVariablesMap( 2603return ImmutableDictionary<ISymbol, PointsToAbstractValue>.Empty; 2609return ImmutableDictionary<ISymbol, PointsToAbstractValue>.Empty; 2745argumentValuesMap: ImmutableDictionary<IParameterSymbol, ArgumentInfo<TAbstractAnalysisValue>>.Empty, 2747addressSharedEntities: ImmutableDictionary<AnalysisEntity, CopyAbstractValue>.Empty,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (1)
33public ImmutableDictionary<TKey, TValue> ToImmutableDictionary()
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\InterproceduralAnalysisData.cs (6)
33ImmutableDictionary<IParameterSymbol, ArgumentInfo<TAbstractAnalysisValue>> argumentValuesMap, 34ImmutableDictionary<ISymbol, PointsToAbstractValue> capturedVariablesMap, 35ImmutableDictionary<AnalysisEntity, CopyAbstractValue> addressSharedEntities, 60public ImmutableDictionary<IParameterSymbol, ArgumentInfo<TAbstractAnalysisValue>> ArgumentValuesMap { get; } 61public ImmutableDictionary<ISymbol, PointsToAbstractValue> CapturedVariablesMap { get; } 62public ImmutableDictionary<AnalysisEntity, CopyAbstractValue> AddressSharedEntities { get; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (3)
40public static ImmutableDictionary<CaptureId, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg) 49ImmutableDictionary<CaptureId, FlowCaptureKind>.Builder lvalueFlowCaptureIdBuilder = null; 80return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<CaptureId, FlowCaptureKind>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
197public ImmutableDictionary<CaptureId, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
13ImmutableDictionary<(ISymbol symbol, IOperation write), bool> symbolWritesMap, 33public ImmutableDictionary<(ISymbol symbol, IOperation write), bool> SymbolWritesMap { get; } = symbolWritesMap;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (5)
57var serializedNameMap = AssignNamesToNamingStyleElements(symbolSpecifications, namingStyles); 58var ruleNameMap = AssignNamesToNamingStyleRules(rules, serializedNameMap); 119private static ImmutableDictionary<Guid, string> AssignNamesToNamingStyleElements( 170private static ImmutableDictionary<NamingRule, string> AssignNamesToNamingStyleRules(ImmutableArray<NamingRule> namingRules, ImmutableDictionary<Guid, string> serializedNameMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
113=> CreateSerializerForEnum(map, ImmutableDictionary<string, T>.Empty); 119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum 130var alternativeMap = ImmutableDictionary<string, T>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 35!treeMap.TryGetValue((semanticModel.SyntaxTree, namespaceId), out var symbolMap))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (4)
20private readonly ImmutableDictionary<TKey, TValue> _forwardMap; 21private readonly ImmutableDictionary<TValue, TKey> _backwardMap; 35private BidirectionalMap(ImmutableDictionary<TKey, TValue> forwardMap, ImmutableDictionary<TValue, TKey> backwardMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\ImmutableDictionaryExtensions.cs (2)
12public static bool KeysEqual<TKey, TValue>(this ImmutableDictionary<TKey, TValue> self, ImmutableDictionary<TKey, TValue> other)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
158public static ImmutableDictionary<TKey, ImmutableHashSet<TValue>> MultiRemove<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
Microsoft.CodeAnalysis.CodeStyle (131)
src\roslyn\src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (2)
33protected static readonly ImmutableDictionary<string, string?> ModifiersAddedProperties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (5)
25private static readonly Dictionary<(bool includeInFixAll, string equivalenceKey), ImmutableDictionary<string, string?>> s_cachedProperties = []; 37var properties = ImmutableDictionary<string, string?>.Empty; 70private static ImmutableDictionary<string, string?> GetProperties(bool includeInFixAll, string equivalenceKey) 175var properties = GetProperties(includeInFixAll, equivalenceKey);
src\roslyn\src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (2)
25public static readonly ImmutableDictionary<string, string?> s_isFixableProperties = 26ImmutableDictionary<string, string?>.Empty.Add(ForEachCastHelpers.IsFixable, ForEachCastHelpers.IsFixable);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (14)
33/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 43ImmutableDictionary<string, string?>? properties, 114return CreateWithMessage(descriptor, location, notificationOption, analyzerOptions, additionalLocations, ImmutableDictionary<string, string?>.Empty, message); 116var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty 126ImmutableDictionary<string, string?>.Empty); 160ImmutableDictionary<string, string?>? properties, 182ImmutableDictionary<string, string?>? properties) 187var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty 208ImmutableDictionary<string, string?>? properties) 213properties ??= ImmutableDictionary<string, string?>.Empty; 255/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 265ImmutableDictionary<string, string?>? properties,
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
88properties: ImmutableDictionary<string, string?>.Empty.Add(MatchFolderAndNamespaceConstants.TargetNamespace, targetNamespace),
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
69var properties = ImmutableDictionary<string, string?>.Empty
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (2)
99var properties = ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
466if (analysisResult.SyntaxDiagnostics.TryGetValue(semanticModel.SyntaxTree, out var diagnostics)) 483static void AddAllDiagnostics(ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> diagnostics, ArrayBuilder<Diagnostic> reportedDiagnostics)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (2)
20private static readonly ImmutableDictionary<string, TargetScope> s_targetScopesMap = CreateTargetScopesMap(); 25private static ImmutableDictionary<string, TargetScope> CreateTargetScopesMap()
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (5)
19using PropertiesMap = ImmutableDictionary<(UnusedValuePreference preference, bool isUnusedLocalAssignment, bool isRemovableAssignment), 20ImmutableDictionary<string, string?>>; 93private static readonly PropertiesMap s_propertiesMap = CreatePropertiesMap(); 147private static PropertiesMap CreatePropertiesMap() 150ImmutableDictionary<string, string?>>();
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (3)
222var properties = s_propertiesMap[(_options.UnusedValueExpressionStatementPreference, isUnusedLocalAssignment: false, isRemovableAssignment: false)]; 587if (ShouldReportUnusedValueDiagnostic(symbol, unreadWriteOperation, symbolUsageResult, out var properties)) 608out ImmutableDictionary<string, string?>? properties)
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (9)
25private static readonly ImmutableDictionary<string, string?> s_takeCondition 26= ImmutableDictionary<string, string?>.Empty; 27private static readonly ImmutableDictionary<string, string?> s_negateCondition 29private static readonly ImmutableDictionary<string, string?> s_takeConditionOrWhenFalse 31private static readonly ImmutableDictionary<string, string?> s_negateConditionAndWhenFalse 33private static readonly ImmutableDictionary<string, string?> s_negateConditionOrWhenTrue 35private static readonly ImmutableDictionary<string, string?> s_takeConditionAndWhenTrue 37private static readonly ImmutableDictionary<string, string?> s_takeConditionAndWhenFalse 138void ReportDiagnostic(ImmutableDictionary<string, string?> properties)
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (2)
37var knownToStringFormats = Helpers.BuildKnownToStringFormatsLookupTable(compilation); 50ImmutableDictionary<IMethodSymbol, string> knownToStringFormats,
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (3)
31public ImmutableDictionary<IMethodSymbol, string> BuildKnownToStringFormatsLookupTable(Compilation compilation) 67ImmutableDictionary<IMethodSymbol, string> knownToStringFormats, 122ImmutableDictionary<IMethodSymbol, string> knownToStringFormats,
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
652var properties = ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (3)
186var properties = shouldUseCollectionExpression ? UseCollectionInitializerHelpers.UseCollectionExpressionProperties : ImmutableDictionary<string, string?>.Empty; 247ImmutableDictionary<string, string?>? properties)
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (2)
19public static readonly ImmutableDictionary<string, string?> UseCollectionExpressionProperties = 20ImmutableDictionary<string, string?>.Empty.Add(UseCollectionExpressionName, UseCollectionExpressionName);
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
29private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _binaryToAssignmentMap;
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (2)
21out ImmutableDictionary<TSyntaxKind, TSyntaxKind> binaryToAssignmentMap, 22out ImmutableDictionary<TSyntaxKind, TSyntaxKind> assignmentToTokenMap) where TSyntaxKind : struct
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (2)
20public static readonly ImmutableDictionary<string, string?> CanSimplifyProperties = 21ImmutableDictionary<string, string?>.Empty.Add(CanSimplifyName, CanSimplifyName);
src\roslyn\src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (2)
61var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
107var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (4)
66private static readonly ImmutableDictionary<string, string?> s_whenPartIsNullableProperties = 67ImmutableDictionary<string, string?>.Empty.Add(UseNullPropagationHelpers.WhenPartIsNullable, ""); 241var properties = whenPartIsNullable 243: ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (2)
145var properties = whenPartIsNullable 147: ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AnalysisResults.cs (4)
32public readonly struct ConditionalExpressionAnalysisResult(TExpressionSyntax conditionPartToCheck, TExpressionSyntax whenPartToCheck, ImmutableDictionary<string, string?> properties) 36public ImmutableDictionary<string, string?> Properties { get; } = properties; 39public readonly struct IfStatementAnalysisResult(TStatementSyntax trueStatement, TExpressionSyntax whenPartMatch, TStatementSyntax? nullAssignmentOpt, ImmutableDictionary<string, string?> properties) 44public ImmutableDictionary<string, string?> Properties { get; } = properties;
src\roslyn\src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (1)
85ImmutableDictionary<string, string?>.Empty));
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (3)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer); 19internal readonly ImmutableDictionary<string, string> Options; 21public DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
687public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 698public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (3)
40public static ImmutableDictionary<CaptureId, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg) 49ImmutableDictionary<CaptureId, FlowCaptureKind>.Builder lvalueFlowCaptureIdBuilder = null; 80return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<CaptureId, FlowCaptureKind>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
197public ImmutableDictionary<CaptureId, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
13ImmutableDictionary<(ISymbol symbol, IOperation write), bool> symbolWritesMap, 33public ImmutableDictionary<(ISymbol symbol, IOperation write), bool> SymbolWritesMap { get; } = symbolWritesMap;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (5)
57var serializedNameMap = AssignNamesToNamingStyleElements(symbolSpecifications, namingStyles); 58var ruleNameMap = AssignNamesToNamingStyleRules(rules, serializedNameMap); 119private static ImmutableDictionary<Guid, string> AssignNamesToNamingStyleElements( 170private static ImmutableDictionary<NamingRule, string> AssignNamesToNamingStyleRules(ImmutableArray<NamingRule> namingRules, ImmutableDictionary<Guid, string> serializedNameMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
113=> CreateSerializerForEnum(map, ImmutableDictionary<string, T>.Empty); 119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum 130var alternativeMap = ImmutableDictionary<string, T>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 35!treeMap.TryGetValue((semanticModel.SyntaxTree, namespaceId), out var symbolMap))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (4)
20private readonly ImmutableDictionary<TKey, TValue> _forwardMap; 21private readonly ImmutableDictionary<TValue, TKey> _backwardMap; 35private BidirectionalMap(ImmutableDictionary<TKey, TValue> forwardMap, ImmutableDictionary<TValue, TKey> backwardMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\ImmutableDictionaryExtensions.cs (2)
12public static bool KeysEqual<TKey, TValue>(this ImmutableDictionary<TKey, TValue> self, ImmutableDictionary<TKey, TValue> other)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
158public static ImmutableDictionary<TKey, ImmutableHashSet<TValue>> MultiRemove<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
Microsoft.CodeAnalysis.CodeStyle.Fixes (55)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (7)
49private ImmutableDictionary<string, ISymbol>? _parameterToExistingMemberMap; 51public ImmutableDictionary<string, string> ParameterToNewFieldMap { get; private set; } 52public ImmutableDictionary<string, string> ParameterToNewPropertyMap { get; private set; } 61ParameterToNewFieldMap = ImmutableDictionary<string, string>.Empty; 62ParameterToNewPropertyMap = ImmutableDictionary<string, string>.Empty; 489var newMemberMap = 492ImmutableDictionary<string, string>.Empty;
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (3)
132ImmutableDictionary<string, ISymbol> parameterToExistingMemberMap, 133ImmutableDictionary<string, string> parameterToNewFieldMap, 134ImmutableDictionary<string, string> parameterToNewPropertyMap)> GetParametersAsync<TExpressionSyntax>(
src\roslyn\src\Analyzers\Core\CodeFixes\Options\FadingOptions.cs (1)
21private static readonly ImmutableDictionary<string, PerLanguageOption2<bool>> s_diagnosticToFadingOption = new Dictionary<string, PerLanguageOption2<bool>>
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
53var properties = diagnostic.Properties;
src\roslyn\src\Analyzers\Core\CodeFixes\RemoveRedundantEquality\RemoveRedundantEqualityCodeFixProvider.cs (1)
33ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\Core\CodeFixes\SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs (1)
55var knownToStringFormats = helpers.BuildKnownToStringFormatsLookupTable(semanticModel.Compilation);
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\UseAutoPropertyFixAllProvider.cs (1)
100var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false);
src\roslyn\src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
64ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\Core\CodeFixes\UseCompoundAssignment\AbstractUseCompoundAssignmentCodeFixProvider.cs (2)
28private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _binaryToAssignmentMap; 29private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _assignmentToTokenMap;
src\roslyn\src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (4)
76private static bool IsTrivialNullableValueAccess(ImmutableDictionary<string, string?> properties) 83ImmutableDictionary<string, string?> properties, 102ImmutableDictionary<string, string?> properties, 160ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
67ImmutableDictionary<string, string?> properties,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (4)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 41return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty.SetItem(document, documentDiagnostics); 106return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty; 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
41ImmutableDictionary<string, string?> properties,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (1)
32var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(fixAllContext).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
284ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewFieldMap, bool isContainedInUnsafeType) 306ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewPropertyMap, bool isContainedInUnsafeType)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
484ImmutableDictionary<string, ISymbol>? parameterToExistingMemberMap, 485ImmutableDictionary<string, string>? parameterToNewMemberMap,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
18private static readonly ImmutableDictionary<BinaryOperatorKind, BinaryOperatorKind> s_negatedBinaryMap =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (9)
59private ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> _semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 73var map = _semanticModelMap; 82_semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 113var originalMap = _semanticModelMap; 125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 138ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map, Document document, SyntaxNode bodyNode, CancellationToken cancellationToken) 175ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (2)
25private ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 26= ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (6)
27private ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 28= ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)>.Empty; 34private ImmutableDictionary<string, MefLanguageServices> _languageServicesMap 35= ImmutableDictionary<string, MefLanguageServices>.Empty; 74var allLanguageServices = Interlocked.Exchange(ref _languageServicesMap, _languageServicesMap.Clear()); 177var currentServicesMap = _languageServicesMap;
Microsoft.CodeAnalysis.CSharp (247)
Binder\Binder_Lookup.cs (3)
418protected bool IsUsingAlias(ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, string name, bool callerIsSemanticModel) 443ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, 1967ImmutableDictionary<string, AliasAndUsingDirective> usingAliases,
Binder\DecisionDagBuilder.cs (58)
1298DagState uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 1357ImmutableDictionary<BoundDagTemp, IValueSet>.Empty); 1407out var whenTrueDecisions, out var whenTrueValues, 1408out var whenFalseDecisions, out var whenFalseValues, 1714out ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1716out ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1751ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1752ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1756ImmutableDictionary<BoundDagTemp, IValueSet> values, 1778ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1779ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1792(var whenTrueValues, var whenFalseValues, fromTestPassing, var fromTestFailing) = splitValues(values, input, fromTestPassing); 1797ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1798ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1801splitValues<TValueSet>(ImmutableDictionary<BoundDagTemp, IValueSet> values, BoundDagTemp input, TValueSet fromTestPassing) where TValueSet : IValueSet 1809var whenTrueValues = values.SetItem(input, fromTestPassing); 1810var whenFalseValues = values.SetItem(input, fromTestFailing); 1815ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1816ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1827(var whenTrueValues, var whenFalseValues, fromTestPassing, var fromTestFailing) = splitValues(values, typeTest.Input, fromTestPassing); 1841ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1842ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1851(var whenTrueValues, var whenFalseValues, fromTestPassing, var fromTestFailing) = splitValues(values, nonNullTest.Input, fromTestPassing); 1862ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1863ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1872(var whenTrueValues, var whenFalseValues, fromTestPassing, var fromTestFailing) = splitValues(values, nullTest.Input, fromTestPassing); 3024public ImmutableDictionary<BoundDagTemp, IValueSet> RemainingValues { get; private set; } = null!; 3053public static DagState GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 3097internal void UpdateRemainingValues(ImmutableDictionary<BoundDagTemp, IValueSet> newRemainingValues) 3254public readonly ImmutableDictionary<BoundDagTemp, BoundDagTemp> FinalTempMap; 3264ImmutableDictionary<BoundDagTemp, BoundDagTemp> finalTempMap, 3277protected abstract RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e); 3281return RemoveEvaluationAndUpdateTempReferences(dagBuilder, state, bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp>.Empty, e); 3284protected Tests RemoveEvaluationAndUpdateTempReferences(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3330private static void AddBindingsPatchingAssignments(ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> oldTempMap, ImmutableDictionary<BoundDagTemp, BoundDagTemp> newTempMap, ArrayBuilder<Tests> assignments) 3351private static bool TryGetTempReplacement(ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagTemp oldTemp, [NotNullWhen(true)] out BoundDagTemp? newTemp) 3393protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3417protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3564protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 3581var savedTempMap = tempMap; 3588var tempsUpdatedResultTempMap = tempMap; 3638public static Tests RemoveEvaluation(One tests, DecisionDagBuilder builder, DagState state, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e, out Tests? condition) 3699private static Tests RemoveSimpleEvaluationWithResultTemp(One tests, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e1) 3711private static void AddResultTempReplacement(ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation oldEval, BoundDagEvaluation newEval) 3716private static void AddTempReplacement(ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagTemp oldTemp, BoundDagTemp newTemp) 3733private static Tests RemoveDeconstructEvaluation(One tests, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagDeconstructEvaluation e1) 3745private static void AddOutParameterTempsReplacement(ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagDeconstructEvaluation oldDeconstruct, BoundDagDeconstructEvaluation newDeconstruct) 3757private static Tests RemoveTypeEvaluation(One tests, DecisionDagBuilder dagBuilder, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagTypeEvaluation e1) 3834private static Tests RemoveIndexerEvaluation(One tests, DecisionDagBuilder dagBuilder, DagState state, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagIndexerEvaluation s1, out Tests? condition) 3892private static BoundDagTest UpdateDagTempReferences(BoundDagTest test, ref ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap) 4023protected override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder builder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 4144protected sealed override RemoveEvaluationAndUpdateTempReferencesResult RemoveEvaluationAndUpdateTempReferencesCore(DecisionDagBuilder dagBuilder, DagState state, ImmutableArray<BoundPatternBinding> bindings, ImmutableDictionary<BoundDagTemp, BoundDagTemp> tempMap, BoundDagEvaluation e) 4150ImmutableDictionary<BoundDagTemp, BoundDagTemp> TempMapToRestore
Binder\ImportChain.cs (1)
95ImmutableDictionary<string, AliasAndUsingDirective> aliasSymbols = Imports.UsingAliases;
Binder\Imports.cs (7)
28ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 32public readonly ImmutableDictionary<string, AliasAndUsingDirective> UsingAliases; 37ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, 70var expandedAliases = ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 152ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, 185var usingAliases = this.UsingAliases.SetItems(otherImports.UsingAliases); // NB: SetItems, rather than AddRange
Binder\WithExternAliasesBinder.cs (2)
38ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 56ImmutableDictionary<string, AliasAndUsingDirective>.Empty,
Binder\WithExternAndUsingAliasesBinder.cs (7)
34protected abstract ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved); 103internal static WithExternAndUsingAliasesBinder Create(ImmutableArray<AliasAndExternAliasDirective> externAliases, ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, WithUsingNamespacesAndTypesBinder next) 114private ImmutableDictionary<string, AliasAndUsingDirective>? _lazyUsingAliasesMap; 151protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved) 229private readonly ImmutableDictionary<string, AliasAndUsingDirective> _usingAliases; 231internal FromSymbols(ImmutableArray<AliasAndExternAliasDirective> externAliases, ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, WithUsingNamespacesAndTypesBinder next) 255protected override ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved)
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
340return Imports.Create(ImmutableDictionary<string, AliasAndUsingDirective>.Empty, _usings, ImmutableArray<AliasAndExternAliasDirective>.Empty);
BoundTree\UnboundLambda.cs (5)
544private ImmutableDictionary<(NamedTypeSymbol Type, bool IsExpressionLambda), BoundLambda>? _bindingCache; 549private ImmutableDictionary<ReturnInferenceCacheKey, BoundLambda>? _returnInferenceCache; 560_bindingCache = ImmutableDictionary<(NamedTypeSymbol Type, bool IsExpressionLambda), BoundLambda>.Empty.WithComparers(BindingCacheComparer.Instance); 561_returnInferenceCache = ImmutableDictionary<ReturnInferenceCacheKey, BoundLambda>.Empty; 1307private static BoundLambda? GuessBestBoundLambda<T>(ImmutableDictionary<T, BoundLambda> candidates)
CommandLine\CSharpCommandLineParser.cs (1)
1498var parsedFeatures = ParseFeatures(features);
Compilation\AttributeSemanticModel.cs (4)
28ImmutableDictionary<Symbol, Symbol>? parentRemappedSymbolsOpt = null) 39public static AttributeSemanticModel Create(PublicSemanticModel containingSemanticModel, AttributeSyntax syntax, NamedTypeSymbol attributeType, AliasSymbol aliasOpt, Symbol? attributeTarget, Binder rootBinder, ImmutableDictionary<Symbol, Symbol>? parentRemappedSymbolsOpt) 48public static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, AttributeSyntax syntax, NamedTypeSymbol attributeType, AliasSymbol aliasOpt, Binder rootBinder, ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt, int position) 108ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols)
Compilation\CSharpCompilation.cs (2)
1027var loadedSyntaxTreeMap = syntaxAndDeclarations.GetLazyState().LoadedSyntaxTreeMap; 1095var loadedSyntaxTreeMap = syntaxAndDeclarations.GetLazyState().LoadedSyntaxTreeMap;
Compilation\InitializerSemanticModel.cs (4)
30ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt = null) : 59internal static InitializerSemanticModel Create(PublicSemanticModel containingSemanticModel, ParameterSyntax syntax, ParameterSymbol parameterSymbol, Binder rootBinder, ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt) 69internal static SpeculativeSemanticModelWithMemberModel CreateSpeculative(SyntaxTreeSemanticModel parentSemanticModel, Symbol owner, EqualsValueClauseSyntax syntax, Binder rootBinder, ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt, int position) 259ref ImmutableDictionary<Symbol, Symbol> remappedSymbols)
Compilation\MemberSemanticModel.cs (9)
37private ImmutableDictionary<Symbol, Symbol> _lazyRemappedSymbols; 38private readonly ImmutableDictionary<Symbol, Symbol> _parentRemappedSymbolsOpt; 51ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt) 163internal ImmutableDictionary<Symbol, Symbol> GetRemappedSymbols() 206ImmutableDictionary<Symbol, Symbol> ignored = null; 1512protected void UnguardedAddBoundTreeForStandaloneSyntax(SyntaxNode syntax, BoundNode bound, NullableWalker.SnapshotManager manager = null, ImmutableDictionary<Symbol, Symbol> remappedSymbols = null) 1520protected void GuardedAddBoundTreeForStandaloneSyntax(SyntaxNode syntax, BoundNode bound, NullableWalker.SnapshotManager manager = null, ImmutableDictionary<Symbol, Symbol> remappedSymbols = null) 1999var remappedSymbols = _parentRemappedSymbolsOpt; 2084ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols);
Compilation\MemberSemanticModel.SpeculativeMemberSemanticModel.cs (2)
31ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt) 49ref ImmutableDictionary<Symbol, Symbol> remappedSymbols)
Compilation\MethodBodySemanticModel.cs (6)
25internal readonly ImmutableDictionary<Symbol, Symbol>? RemappedSymbols; 32ImmutableDictionary<Symbol, Symbol>? remappedSymbols = null) 48ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt = null) 116ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt, 128ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt, 292ref ImmutableDictionary<Symbol, Symbol> remappedSymbols)
Compilation\SpeculativeSemanticModelWithMemberModel.cs (6)
26private ImmutableDictionary<CSharpSyntaxNode, MemberSemanticModel> _childMemberModels = ImmutableDictionary<CSharpSyntaxNode, MemberSemanticModel>.Empty; 48ImmutableDictionary<Symbol, Symbol>? parentRemappedSymbolsOpt) 77ImmutableDictionary<Symbol, Symbol>? parentRemappedSymbolsOpt) 93ImmutableDictionary<Symbol, Symbol>? parentRemappedSymbolsOpt, 106ImmutableDictionary<Symbol, Symbol>? parentRemappedSymbolsOpt,
Compilation\SyntaxAndDeclarationManager.cs (16)
314var loadDirectiveMap = state.LoadDirectiveMap; 315var loadedSyntaxTreeMap = state.LoadedSyntaxTreeMap; 386ImmutableDictionary<SyntaxTree, int> syntaxTreeOrdinalMap, 387ImmutableDictionary<SyntaxTree, ImmutableArray<LoadDirective>> loadDirectiveMap, 388ImmutableDictionary<string, SyntaxTree> loadedSyntaxTreeMap, 434ImmutableDictionary<SyntaxTree, ImmutableArray<LoadDirective>> loadDirectiveMap, 435ImmutableDictionary<string, SyntaxTree> loadedSyntaxTreeMap, 478var ordinalMap = state.OrdinalMap; 479var loadDirectiveMap = state.LoadDirectiveMap; 480var loadedSyntaxTreeMap = state.LoadedSyntaxTreeMap; 607ImmutableDictionary<SyntaxTree, Lazy<RootSingleNamespaceDeclaration>>.Builder declMapBuilder, 608ImmutableDictionary<SyntaxTree, OneOrMany<WeakReference<StrongBox<ImmutableSegmentedHashSet<string>>>>>.Builder lastComputedMemberNamesMap) 668internal static bool IsLoadedSyntaxTree(SyntaxTree tree, ImmutableDictionary<string, SyntaxTree> loadedSyntaxTreeMap) 678ImmutableDictionary<SyntaxTree, ImmutableArray<LoadDirective>> loadDirectiveMap, 679ImmutableDictionary<string, SyntaxTree> loadedSyntaxTreeMap) 728private static bool TryGetLoadedSyntaxTree(ImmutableDictionary<string, SyntaxTree> loadedSyntaxTreeMap, LoadDirective directive, out SyntaxTree loadedTree)
Compilation\SyntaxAndDeclarationManager.LazyState.cs (10)
21internal readonly ImmutableDictionary<SyntaxTree, int> OrdinalMap; // Inverse of syntaxTrees array (i.e. maps tree to index) 22internal readonly ImmutableDictionary<SyntaxTree, ImmutableArray<LoadDirective>> LoadDirectiveMap; 23internal readonly ImmutableDictionary<string, SyntaxTree> LoadedSyntaxTreeMap; 24internal readonly ImmutableDictionary<SyntaxTree, Lazy<RootSingleNamespaceDeclaration>> RootNamespaces; 43internal readonly ImmutableDictionary<SyntaxTree, OneOrMany<WeakReference<StrongBox<ImmutableSegmentedHashSet<string>>>>> LastComputedMemberNames; 48ImmutableDictionary<SyntaxTree, int> syntaxTreeOrdinalMap, 49ImmutableDictionary<SyntaxTree, ImmutableArray<LoadDirective>> loadDirectiveMap, 50ImmutableDictionary<string, SyntaxTree> loadedSyntaxTreeMap, 51ImmutableDictionary<SyntaxTree, Lazy<RootSingleNamespaceDeclaration>> rootNamespaces, 52ImmutableDictionary<SyntaxTree, OneOrMany<WeakReference<StrongBox<ImmutableSegmentedHashSet<string>>>>> lastComputedMemberNames,
Compilation\SyntaxTreeSemanticModel.cs (3)
35private ImmutableDictionary<CSharpSyntaxNode, MemberSemanticModel> _memberModels = ImmutableDictionary<CSharpSyntaxNode, MemberSemanticModel>.Empty; 973internal ImmutableDictionary<CSharpSyntaxNode, MemberSemanticModel> TestOnlyMemberModels => _memberModels;
Compiler\MethodCompiler.cs (1)
1950ImmutableDictionary<Symbol, Symbol>? remappedSymbols = null;
CSharpCompilationOptions.cs (3)
475protected override CompilationOptions CommonWithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>? specificDiagnosticOptions) => 494public new CSharpCompilationOptions WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>? values) 498values = ImmutableDictionary<string, ReportDiagnostic>.Empty;
CSharpParseOptions.cs (4)
24private ImmutableDictionary<string, string> _features; 59ImmutableDictionary<string, string>.Empty) 74_features = features?.ToImmutableDictionary() ?? ImmutableDictionary<string, string>.Empty; 170if (features is not ImmutableDictionary<string, string> dictionary || dictionary.KeyComparer != StringComparer.OrdinalIgnoreCase)
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
106ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> assemblyReferenceIdentityMap;
Errors\ErrorFacts.cs (3)
21private static readonly Lazy<ImmutableDictionary<ErrorCode, string>> s_categoriesMap = new Lazy<ImmutableDictionary<ErrorCode, string>>(CreateCategoriesMap); 96private static ImmutableDictionary<ErrorCode, string> CreateCategoriesMap()
FlowAnalysis\NullableWalker.cs (11)
241private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)>.Builder? _analyzedNullabilityMapOpt; 509ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 1625ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1627ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> analyzedNullabilitiesMap; 1632private static (SnapshotManager?, ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>) AnalyzeWithSemanticInfo( 1669var analyzedNullabilitiesMap = analyzedNullabilities.ToImmutable(); 1698ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1730var analyzedNullabilitiesMap = analyzedNullabilities.ToImmutable(); 1740private static BoundNode Rewrite(ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> updatedNullabilities, SnapshotManager? snapshotManager, BoundNode node, ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1867ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt,
FlowAnalysis\NullableWalker.DebugVerifier.cs (3)
21private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _analyzedNullabilityMap; 26private DebugVerifier(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManager) 37public static void Verify(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> analyzedNullabilityMap, SnapshotManager? snapshotManagerOpt, BoundNode node)
FlowAnalysis\NullableWalker.SnapshotManager.cs (4)
31private readonly ImmutableDictionary<(BoundNode?, Symbol), Symbol> _updatedSymbolsMap; 35private SnapshotManager(ImmutableArray<SharedWalkerState> walkerSharedStates, ImmutableArray<(int position, Snapshot snapshot)> incrementalSnapshots, ImmutableDictionary<(BoundNode?, Symbol), Symbol> updatedSymbolsMap) 148private readonly ImmutableDictionary<(BoundNode?, Symbol), Symbol>.Builder _updatedSymbolMap = ImmutableDictionary.CreateBuilder<(BoundNode?, Symbol), Symbol>(ExpressionAndSymbolEqualityComparer.Instance, Symbols.SymbolEqualityComparer.ConsiderEverything); 177var updatedSymbols = _updatedSymbolMap.ToImmutable();
FlowAnalysis\NullableWalker.Variables.cs (2)
48internal readonly ImmutableDictionary<Symbol, TypeWithAnnotations> VariableTypes; 50internal VariablesSnapshot(int id, VariablesSnapshot? container, Symbol? symbol, ImmutableArray<KeyValuePair<VariableIdentifier, int>> variableSlot, ImmutableDictionary<Symbol, TypeWithAnnotations> variableTypes)
Generated\BoundNodes.xml.Generated.cs (4)
12710private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _updatedNullabilities; 12712private readonly ImmutableDictionary<Symbol, Symbol>.Builder _remappedSymbols; 12714public NullabilityRewriter(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> updatedNullabilities, NullableWalker.SnapshotManager? snapshotManager, ImmutableDictionary<Symbol, Symbol>.Builder remappedSymbols)
Lowering\ExtensionMethodBodyRewriter.cs (6)
23private ImmutableDictionary<Symbol, Symbol> _symbolMap; 38_symbolMap = ImmutableDictionary<Symbol, Symbol>.Empty.WithComparers(ReferenceEqualityComparer.Instance, ReferenceEqualityComparer.Instance); 51private (RewrittenMethodSymbol, ImmutableDictionary<Symbol, Symbol>) EnterMethod(MethodSymbol symbol, RewrittenMethodSymbol rewritten, ReadOnlySpan<ParameterSymbol> rewrittenParameters) 53ImmutableDictionary<Symbol, Symbol> saveSymbolMap = _symbolMap; 73private (RewrittenMethodSymbol, ImmutableDictionary<Symbol, Symbol>) EnterMethod(MethodSymbol symbol, RewrittenLambdaOrLocalFunctionSymbol rewritten) 123ImmutableDictionary<Symbol, Symbol> saveSymbolMap = _symbolMap;
Lowering\LocalRewriter\LocalRewriter_BasePatternSwitchLocalRewriter.cs (2)
73protected (ImmutableArray<BoundStatement> loweredDag, ImmutableDictionary<SyntaxNode, ImmutableArray<BoundStatement>> switchSections) LowerDecisionDag(BoundDecisionDag decisionDag) 76var switchSections = _switchArms.ToImmutableDictionary(kv => kv.Key, kv => kv.Value.ToImmutableAndFree());
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (1)
121(ImmutableArray<BoundStatement> loweredDag, ImmutableDictionary<SyntaxNode, ImmutableArray<BoundStatement>> switchSections) =
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (1)
63(ImmutableArray<BoundStatement> loweredDag, ImmutableDictionary<SyntaxNode, ImmutableArray<BoundStatement>> switchSections) =
Symbols\Compilation_UsedAssemblies.cs (1)
32ImmutableDictionary<MetadataReference, ImmutableArray<MetadataReference>> mergedAssemblyReferencesMap = GetBoundReferenceManager().MergedAssemblyReferencesMap;
Symbols\ReferenceManager.cs (3)
246public PEAssemblySymbol CreatePEAssemblyForAssemblyMetadata(AssemblyMetadata metadata, MetadataImportOptions importOptions, out ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> assemblyReferenceIdentityMap) 378var implicitReferenceResolutions = compilation.ScriptCompilationInfo?.PreviousScriptCompilation?.GetBoundReferenceManager().ImplicitReferenceResolutions ?? 379ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?>.Empty;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
31public ImmutableDictionary<MethodSymbol, MethodSymbol>? LazyImplementationMap;
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (23)
89ref ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings> dictionary, 174public ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 181var result = GetGlobalUsingAliasesMap(basesBeingResolved); 195return ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 243private ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(ConsList<TypeSymbol>? basesBeingResolved) 263ImmutableDictionary<string, AliasAndUsingDirective>? mergedAliases = null; 281var aliases = GetAliasesAndUsings(singleDeclaration).GetGlobalUsingAliasesMap(this, singleDeclaration.SyntaxReference, basesBeingResolved); 356var globalAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 380UsingAliasesMap = mergedAliases ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 520internal ImmutableDictionary<string, AliasAndUsingDirective> GetUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, CSharpSyntaxNode declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 522return GetUsingsAndDiagnostics(declaringSymbol, declarationSyntax, basesBeingResolved).UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 525internal ImmutableDictionary<string, AliasAndUsingDirective> GetGlobalUsingAliasesMap(SourceNamespaceSymbol declaringSymbol, SyntaxReference declarationSyntax, ConsList<TypeSymbol>? basesBeingResolved) 527return (_lazyGlobalUsings ?? GetGlobalUsingsAndDiagnostics(declaringSymbol, (CSharpSyntaxNode)declarationSyntax.GetSyntax(), basesBeingResolved)).UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 599Debug.Assert((calculated.UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty).SetEquals(result.UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty)); 624var globalUsingAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty; 641ImmutableDictionary<string, AliasAndUsingDirective>.Builder? usingAliasesMap = null; 1130public ImmutableDictionary<string, AliasAndUsingDirective>? UsingAliasesMap { get; init; } 1148UsingAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 1154public ImmutableDictionary<string, AliasAndUsingDirective>? UsingAliasesMap { get; init; } 1165Imports.Create(UsingAliasesMap ?? ImmutableDictionary<string, AliasAndUsingDirective>.Empty,
Symbols\Source\SourceNamespaceSymbol.cs (4)
22private static readonly ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings> s_emptyMap = 23ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings>.Empty.WithComparers(ReferenceEqualityComparer.Instance); 39private ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings> _aliasesAndUsings_doNotAccessDirectly = s_emptyMap; 44private ImmutableDictionary<SingleNamespaceDeclaration, AliasesAndUsings> _aliasesAndUsingsForAsserts_doNotAccessDirectly = s_emptyMap;
Symbols\TypeSymbol.cs (2)
87internal ImmutableDictionary<MethodSymbol, MethodSymbol>? synthesizedMethodImplMap; 2357ImmutableDictionary<MethodSymbol, MethodSymbol> makeSynthesizedMethodImplMap()
Syntax\CSharpPragmaWarningStateMap.cs (1)
86var accumulatedSpecificWarningState = ImmutableDictionary.Create<string, PragmaWarningState>();
Syntax\CSharpSyntaxTree.cs (6)
335ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 455ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 493ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 906ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 918ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 930ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions)
Syntax\CSharpSyntaxTree.Dummy.cs (1)
60public override ImmutableDictionary<string, ReportDiagnostic> DiagnosticOptions
Syntax\CSharpSyntaxTree.LazySyntaxTree.cs (4)
22private readonly ImmutableDictionary<string, ReportDiagnostic> _diagnosticOptions; 29ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions) 102public override ImmutableDictionary<string, ReportDiagnostic> DiagnosticOptions => _diagnosticOptions; 155public override SyntaxTree WithDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic> options)
Syntax\CSharpSyntaxTree.ParsedSyntaxTree.cs (4)
28private readonly ImmutableDictionary<string, ReportDiagnostic> _diagnosticOptions; 39ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 116public override ImmutableDictionary<string, ReportDiagnostic> DiagnosticOptions => _diagnosticOptions; 162public override SyntaxTree WithDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic> options)
Syntax\SyntaxFactory.cs (4)
2835ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 2848ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 2862ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 2876ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions,
Microsoft.CodeAnalysis.CSharp.CodeStyle (43)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
62ImmutableDictionary<string, string?>.Empty);
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
65ImmutableDictionary<string, string?>.Empty);
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToProgramMainDiagnosticAnalyzer.cs (1)
62ImmutableDictionary<string, string?>.Empty));
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
82ImmutableDictionary<string, string?>.Empty));
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
73properties: ImmutableDictionary<string, string?>.Empty
src\roslyn\src\Analyzers\CSharp\Analyzers\HiddenExplicitCast\CSharpHiddenExplicitCastDiagnosticAnalyzer.cs (1)
117properties: ImmutableDictionary<string, string?>.Empty.Add(Type, typeToInsertCastFor),
src\roslyn\src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (2)
176var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (2)
21private static readonly ImmutableDictionary<string, string?> s_subsequentSectionProperties = ImmutableDictionary<string, string?>.Empty.Add(IsSubsequentSection, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (2)
20public static readonly ImmutableDictionary<string, string?> ChangesSemantics = 21ImmutableDictionary<string, string?>.Empty.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (1)
207var properties = changesSemantics ? ChangesSemantics : null;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
53var properties = analysisResult.ChangesSemantics ? ChangesSemantics : null;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (1)
49var properties = GetDiagnosticProperties(unwrapArgument, useSpread, changesSemantics);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
91var properties = GetDiagnosticProperties(unwrapArgument, useSpread, changesSemantics);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
1229public static ImmutableDictionary<string, string?> GetDiagnosticProperties(bool unwrapArgument, bool useSpread, bool changesSemantics) 1231var properties = ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (4)
105var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(UseExpressionBody), ""); 119var properties = ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (2)
83ImmutableDictionary<string, string?>.Empty); 97ImmutableDictionary<string, string?>.Empty);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (6)
33private static readonly ImmutableDictionary<string, string?> BuiltInTypeProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.BuiltInType); 34private static readonly ImmutableDictionary<string, string?> TypeIsApparentProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.TypeIsApparent); 35private static readonly ImmutableDictionary<string, string?> ElsewhereProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.Elsewhere);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
211ImmutableDictionary<string, string?>.Empty));
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
327ImmutableDictionary<string, string?>.Empty,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (4)
18private static readonly ImmutableDictionary<string, string?> s_properties = 19ImmutableDictionary<string, string?>.Empty.Add(UseIsNullConstants.Kind, UseIsNullConstants.CastAndEqualityKey); 20private static readonly ImmutableDictionary<string, string?> s_NegatedProperties = 61var properties = binaryExpression.Kind() == SyntaxKind.EqualsExpression
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
106ImmutableDictionary<string, string?>.Empty.Add(NameKey, stringValue)));
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (2)
31private static readonly ImmutableDictionary<string, string?> s_safeProperties = ImmutableDictionary<string, string?>.Empty.Add(SafeKey, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
167var properties = _candidateMembersToRemove
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
143var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(ArrayCreationOperationLocation), operationLocation.ToString());
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (33)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
58var properties = diagnostic.Properties;
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (9)
195var assignmentValues = GetAssignmentValuesForConstructor(operation, 237var assignmentValues = GetAssignmentValuesForConstructor(operation, 293var assignmentValues = GetAssignmentValuesForConstructor(operation, 378var dictionaryBuilder = ImmutableDictionary<ISymbol, ExpressionSyntax>.Empty.ToBuilder(); 403ImmutableDictionary<ISymbol, ExpressionSyntax> assignmentValues) 419private static ImmutableDictionary<ISymbol, T> GetAssignmentValuesForConstructor<T>( 424var dictionaryBuilder = ImmutableDictionary<ISymbol, T>.Empty.ToBuilder(); 430return ImmutableDictionary<ISymbol, T>.Empty; 461return ImmutableDictionary<ISymbol, T>.Empty;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
38ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
41ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForCreateCodeFixProvider.cs (1)
39ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyCodeFixProvider.cs (1)
37ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
47ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForNewCodeFixProvider.cs (1)
40ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (1)
34ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeFixProvider.cs (1)
37ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (7)
66var properties = diagnostic.Properties; 96ImmutableDictionary<string, string?> properties, 112ImmutableDictionary<string, string?> properties, 127var removedMembers = await RemoveMembersAsync().ConfigureAwait(false); 510async ValueTask<ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)>> RemoveMembersAsync() 512var removedMembers = ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)>.Empty;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (4)
68ImmutableDictionary<string, string?> properties, 69ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)> removedMembers) 166ImmutableDictionary<string, string?> properties, 167ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)> removedMembers,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (4)
24protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 30return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty; 43return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty; 48return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty
Microsoft.CodeAnalysis.CSharp.Features (88)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (2)
110var parameterToSynthesizedFields = CreateSynthesizedFields(); 182ImmutableDictionary<IParameterSymbol, IFieldSymbol> CreateSynthesizedFields()
ConvertToExtension\ConvertToExtensionCodeRefactoringProvider.cs (5)
121private static ImmutableDictionary<ExtensionMethodInfo, ImmutableArray<ExtensionMethodInfo>> GetAllExtensionMethods( 162var allExtensionMethods = GetAllExtensionMethods( 178var allExtensionMethods = GetAllExtensionMethods( 195ImmutableDictionary<ExtensionMethodInfo, ImmutableArray<ExtensionMethodInfo>> allExtensionMethods, 220ImmutableDictionary<ExtensionMethodInfo, ImmutableArray<ExtensionMethodInfo>> allExtensionMethods,
ConvertToExtension\ConvertToExtensionFixAllProvider.cs (1)
44var extensionMethods = GetAllExtensionMethods(semanticModel, declaration, cancellationToken);
Copilot\CSharpImplementNotImplementedExceptionFixProvider.cs (1)
109var memberImplementationDetails = await copilotService.ImplementNotImplementedExceptionsAsync(document, memberReferencesBuilder.ToImmutable(), cancellationToken).ConfigureAwait(false);
ExtractInterface\CSharpExtractInterfaceService.cs (1)
69IEnumerable<ISymbol> includedMembers, ImmutableDictionary<ISymbol, SyntaxAnnotation> symbolToDeclarationMap,
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
130var groupedDiagnostics = await service.GetDiagnosticDescriptorsPerReferenceAsync(
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
62ImmutableDictionary<string, string?>.Empty);
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
65ImmutableDictionary<string, string?>.Empty);
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToProgramMainDiagnosticAnalyzer.cs (1)
62ImmutableDictionary<string, string?>.Empty));
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
82ImmutableDictionary<string, string?>.Empty));
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
73properties: ImmutableDictionary<string, string?>.Empty
src\roslyn\src\Analyzers\CSharp\Analyzers\HiddenExplicitCast\CSharpHiddenExplicitCastDiagnosticAnalyzer.cs (1)
117properties: ImmutableDictionary<string, string?>.Empty.Add(Type, typeToInsertCastFor),
src\roslyn\src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (2)
176var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (2)
21private static readonly ImmutableDictionary<string, string?> s_subsequentSectionProperties = ImmutableDictionary<string, string?>.Empty.Add(IsSubsequentSection, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (2)
20public static readonly ImmutableDictionary<string, string?> ChangesSemantics = 21ImmutableDictionary<string, string?>.Empty.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (1)
207var properties = changesSemantics ? ChangesSemantics : null;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
53var properties = analysisResult.ChangesSemantics ? ChangesSemantics : null;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (1)
49var properties = GetDiagnosticProperties(unwrapArgument, useSpread, changesSemantics);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
91var properties = GetDiagnosticProperties(unwrapArgument, useSpread, changesSemantics);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
1229public static ImmutableDictionary<string, string?> GetDiagnosticProperties(bool unwrapArgument, bool useSpread, bool changesSemantics) 1231var properties = ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (4)
105var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(UseExpressionBody), ""); 119var properties = ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (2)
83ImmutableDictionary<string, string?>.Empty); 97ImmutableDictionary<string, string?>.Empty);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (6)
33private static readonly ImmutableDictionary<string, string?> BuiltInTypeProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.BuiltInType); 34private static readonly ImmutableDictionary<string, string?> TypeIsApparentProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.TypeIsApparent); 35private static readonly ImmutableDictionary<string, string?> ElsewhereProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.Elsewhere);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
211ImmutableDictionary<string, string?>.Empty));
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
327ImmutableDictionary<string, string?>.Empty,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (4)
18private static readonly ImmutableDictionary<string, string?> s_properties = 19ImmutableDictionary<string, string?>.Empty.Add(UseIsNullConstants.Kind, UseIsNullConstants.CastAndEqualityKey); 20private static readonly ImmutableDictionary<string, string?> s_NegatedProperties = 61var properties = binaryExpression.Kind() == SyntaxKind.EqualsExpression
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
106ImmutableDictionary<string, string?>.Empty.Add(NameKey, stringValue)));
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (2)
31private static readonly ImmutableDictionary<string, string?> s_safeProperties = ImmutableDictionary<string, string?>.Empty.Add(SafeKey, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
167var properties = _candidateMembersToRemove
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
143var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(ArrayCreationOperationLocation), operationLocation.ToString());
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
58var properties = diagnostic.Properties;
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (9)
195var assignmentValues = GetAssignmentValuesForConstructor(operation, 237var assignmentValues = GetAssignmentValuesForConstructor(operation, 293var assignmentValues = GetAssignmentValuesForConstructor(operation, 378var dictionaryBuilder = ImmutableDictionary<ISymbol, ExpressionSyntax>.Empty.ToBuilder(); 403ImmutableDictionary<ISymbol, ExpressionSyntax> assignmentValues) 419private static ImmutableDictionary<ISymbol, T> GetAssignmentValuesForConstructor<T>( 424var dictionaryBuilder = ImmutableDictionary<ISymbol, T>.Empty.ToBuilder(); 430return ImmutableDictionary<ISymbol, T>.Empty; 461return ImmutableDictionary<ISymbol, T>.Empty;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
38ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
41ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForCreateCodeFixProvider.cs (1)
39ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyCodeFixProvider.cs (1)
37ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
47ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForNewCodeFixProvider.cs (1)
40ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (1)
34ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeFixProvider.cs (1)
37ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (7)
66var properties = diagnostic.Properties; 96ImmutableDictionary<string, string?> properties, 112ImmutableDictionary<string, string?> properties, 127var removedMembers = await RemoveMembersAsync().ConfigureAwait(false); 510async ValueTask<ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)>> RemoveMembersAsync() 512var removedMembers = ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)>.Empty;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (4)
68ImmutableDictionary<string, string?> properties, 69ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)> removedMembers) 166ImmutableDictionary<string, string?> properties, 167ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)> removedMembers,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorFixAllProvider.cs (1)
47var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockFixAllProvider.cs (1)
38var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false);
Structure\CSharpBlockStructureProvider.cs (2)
15private static ImmutableDictionary<Type, ImmutableArray<AbstractSyntaxStructureProvider>> CreateDefaultNodeProviderMap() 62private static ImmutableDictionary<int, ImmutableArray<AbstractSyntaxStructureProvider>> CreateDefaultTriviaProviderMap()
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
102ImmutableDictionary<string, string?>.Empty));
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Rename\CSharpRenameRewriterLanguageService.cs (2)
54private readonly ImmutableDictionary<TextSpan, RenameLocation> _renameLocations; 91private readonly ImmutableDictionary<TextSpan, ImmutableSortedSet<TextSpan>?> _stringAndCommentTextSpans;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (4)
24protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 30return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty; 43return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty; 48return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty
Microsoft.CodeAnalysis.Extensions.Package (17)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
687public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 698public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
Microsoft.CodeAnalysis.ExternalAccess.HotReload (3)
Api\HotReloadService.cs (3)
118public required ImmutableDictionary<ProjectId, ImmutableArray<ProjectId>> ProjectsToRestart { get; init; } 194public async Task<Updates> GetUpdatesAsync(Solution solution, ImmutableDictionary<ProjectId, RunningProjectInfo> runningProjects, CancellationToken cancellationToken) 198var runningProjectsImpl = runningProjects.ToImmutableDictionary(
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (3)
Formatting\OmniSharpSyntaxFormattingOptionsWrapper.cs (1)
28StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty
Options\OmniSharpSolutionAnalyzerConfigOptionsUpdater.cs (2)
24var oldFallbackOptions = oldSolution.FallbackAnalyzerOptions; 51var newFallbackOptions = oldFallbackOptions.SetItem(
Microsoft.CodeAnalysis.Features (429)
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (1)
68var properties = diagnostic.Properties;
CodeFixes\FixAllOccurrences\IFixMultipleOccurrencesService.cs (2)
20ImmutableDictionary<Document, ImmutableArray<Diagnostic>> diagnosticsToFix, 35ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsToFix,
CodeFixes\Service\CodeFixService.cs (36)
43private readonly Lazy<ImmutableDictionary<string, ImmutableArray<Lazy<CodeFixProvider, CodeChangeProviderMetadata>>>> _fixersPerLanguageMap; 45private readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>> _projectFixersMap = new(); 48private readonly Lazy<ImmutableDictionary<LanguageKind, Lazy<ImmutableArray<IConfigurationFixProvider>>>> _configurationProvidersMap; 51private ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>>? _lazyWorkspaceFixersMap; 52private ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<CodeFixProvider, int>>>? _lazyFixerPriorityMap; 54private ImmutableDictionary<CodeFixProvider, ImmutableArray<DiagnosticId>> _fixerToFixableIdsMap = ImmutableDictionary<CodeFixProvider, ImmutableArray<DiagnosticId>>.Empty; 55private ImmutableDictionary<object, FixAllProviderInfo?> _fixAllProviderMap = ImmutableDictionary<object, FixAllProviderInfo?>.Empty; 56private ImmutableDictionary<CodeFixProvider, CodeChangeProviderMetadata?> _fixerToMetadataMap = ImmutableDictionary<CodeFixProvider, CodeChangeProviderMetadata?>.Empty; 88var projectFixersMap = GetProjectFixers(document); 363var workspaceFixersMap = GetFixerPerLanguageMap(document.Project.Solution.Services); 382private bool TryGetWorkspaceFixersPriorityMap(TextDocument document, [NotNullWhen(true)] out Lazy<ImmutableDictionary<CodeFixProvider, int>>? fixersPriorityMap) 386var fixersPriorityByLanguageMap = GetFixerPriorityPerLanguageMap(document.Project.Solution.Services); 447var projectFixersMap = GetProjectFixers(document); 903private ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>> GetFixerPerLanguageMap( 906var fixerMap = ImmutableDictionary.Create<LanguageKind, Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>>(); 910var lazyMap = new Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>(() => 941private static ImmutableDictionary<LanguageKind, Lazy<ImmutableArray<IConfigurationFixProvider>>> GetConfigurationProvidersPerLanguageMap( 944var configurationProvidersPerLanguageMap = configurationProviders.ToPerLanguageMapWithMultipleLanguages(); 966private ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<CodeFixProvider, int>>> GetFixerPriorityPerLanguageMap(SolutionServices services) 968var languageMap = ImmutableDictionary.CreateBuilder<LanguageKind, Lazy<ImmutableDictionary<CodeFixProvider, int>>>(); 971var lazyMap = new Lazy<ImmutableDictionary<CodeFixProvider, int>>(() => 993private ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>> GetProjectFixers(TextDocument document) 997? ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>.Empty 1001private ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>> ComputeProjectFixers(TextDocument document) 1032private readonly ImmutableDictionary<CodeFixProvider, int> _priorityMap; 1036ImmutableDictionary<CodeFixProvider, int> priorityMap) 1073public ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<CodeFixProvider, int>>> GetFixerPriorityPerLanguageMap(SolutionServices services)
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (5)
34var documentsAndDiagnosticsToFixMap = await fixAllContext.GetDocumentDiagnosticsToFixAsync().ConfigureAwait(false); 39var projectsAndDiagnosticsToFixMap = await fixAllContext.GetProjectDiagnosticsToFixAsync().ConfigureAwait(false); 45ImmutableDictionary<Document, ImmutableArray<Diagnostic>> documentsAndDiagnosticsToFixMap, 75ImmutableDictionary<Document, ImmutableArray<Diagnostic>> documentsAndDiagnosticsToFixMap, 135ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectsAndDiagnosticsToFixMap,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (6)
41internal static CodeAction Create(string title, AbstractSuppressionCodeFixProvider fixer, Document triggerDocument, ImmutableDictionary<Document, ImmutableArray<Diagnostic>> diagnosticsByDocument) 48internal static CodeAction Create(string title, AbstractSuppressionCodeFixProvider fixer, Project triggerProject, ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject) 70ImmutableDictionary<Document, ImmutableArray<Diagnostic>> diagnosticsByDocument, 99ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject, 190private static void AddDiagnosticForSymbolIfNeeded(ISymbol targetSymbol, Diagnostic diagnostic, ImmutableDictionary<ISymbol, List<Diagnostic>>.Builder diagnosticsMapBuilder) 206private static IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>> CreateDiagnosticsBySymbol(ImmutableDictionary<ISymbol, List<Diagnostic>>.Builder diagnosticsMapBuilder)
CodeRefactorings\CodeRefactoringService.cs (6)
33private readonly Lazy<ImmutableDictionary<ProviderKey, Lazy<ImmutableArray<CodeRefactoringProvider>>>> _lazyLanguageDocumentToProvidersMap = 41private readonly Lazy<ImmutableDictionary<CodeRefactoringProvider, CodeChangeProviderMetadata>> _lazyRefactoringToMetadataMap = new(() => providers.Where(provider => provider.IsValueCreated).ToImmutableDictionary(provider => provider.Value, provider => provider.Metadata)); 43private ImmutableDictionary<CodeRefactoringProvider, FixAllProviderInfo?> _fixAllProviderMap = ImmutableDictionary<CodeRefactoringProvider, FixAllProviderInfo?>.Empty; 74private ImmutableDictionary<ProviderKey, Lazy<ImmutableArray<CodeRefactoringProvider>>> LanguageDocumentToProvidersMap 77private ImmutableDictionary<CodeRefactoringProvider, CodeChangeProviderMetadata> RefactoringToMetadataMap
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
91var candidates = Enumerable.Range(1, parts.Length)
Common\AbstractProjectExtensionProvider.cs (2)
30private ImmutableDictionary<string, ImmutableArray<TExtension>> _extensionsPerLanguage = ImmutableDictionary<string, ImmutableArray<TExtension>>.Empty;
Completion\CompletionChange.cs (6)
49internal ImmutableDictionary<string, string> Properties { get; } 53: this(textChange, textChanges, newPosition, includesCommitCharacter, ImmutableDictionary<string, string>.Empty) 58TextChange textChange, ImmutableArray<TextChange> textChanges, int? newPosition, bool includesCommitCharacter, ImmutableDictionary<string, string> properties) 64TextChange textChange, ImmutableArray<TextChange> textChanges, TextSpan? newSelection, bool includesCommitCharacter, ImmutableDictionary<string, string> properties) 124ImmutableDictionary<string, string> properties, 134ImmutableDictionary<string, string> properties,
Completion\CompletionItem.cs (8)
24private ImmutableDictionary<string, string>? _lazyPropertiesAsImmutableDictionary; 95public ImmutableDictionary<string, string> Properties 219ImmutableDictionary<string, string>? properties, 231ImmutableDictionary<string, string>? properties, 245ImmutableDictionary<string, string>? properties, 261ImmutableDictionary<string, string>? properties = null, 321ImmutableDictionary<string, string>? properties, 447public CompletionItem WithProperties(ImmutableDictionary<string, string> properties)
Completion\CompletionService.ProviderManager.cs (3)
29private readonly Lazy<ImmutableDictionary<string, CompletionProvider>> _nameToProvider; 40_nameToProvider = new Lazy<ImmutableDictionary<string, CompletionProvider>>(LoadImportedProvidersAndCreateNameMap, LazyThreadSafetyMode.PublicationOnly); 50private ImmutableDictionary<string, CompletionProvider> LoadImportedProvidersAndCreateNameMap()
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
57return CompletionChange.Create(change, changesArray, properties: ImmutableDictionary<string, string>.Empty, newSpan, includesCommitCharacter: true);
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (2)
60var props = ImmutableDictionary<string, string>.Empty
Completion\Providers\SymbolCompletionItem.cs (1)
337ImmutableDictionary<string, string>? properties = null,
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (3)
151ImmutableDictionary<IPropertySymbol, string> propertyMap, CancellationToken cancellationToken) 320private static (ImmutableArray<IPropertySymbol> properties, ImmutableDictionary<IPropertySymbol, string> propertyMap) GenerateProperties( 395semanticModel, parameters, parameterToPropMap, ImmutableDictionary<string, string>.Empty,
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
942semanticModel, parameters, parameterToPropMap, ImmutableDictionary<string, string>.Empty,
Copilot\ICopilotCodeAnalysisService.cs (2)
100Task<ImmutableDictionary<SyntaxNode, ImplementationDetails>> ImplementNotImplementedExceptionsAsync( 102ImmutableDictionary<SyntaxNode, ImmutableArray<ReferencedSymbol>> methodOrProperties,
Diagnostics\DiagnosticAnalyzerTelemetry.cs (4)
46private ImmutableDictionary<Type, Data> _analyzerInfoMap; 49=> _analyzerInfoMap = ImmutableDictionary<Type, Data>.Empty; 61ImmutableDictionary<Type, Data> map; 65_analyzerInfoMap = ImmutableDictionary<Type, Data>.Empty;
Diagnostics\IDiagnosticAnalyzerService.cs (4)
97Task<ImmutableDictionary<ProjectId, ImmutableHashSet<string>>> GetAllDiagnosticIdsAsync( 101Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 155public static Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 159public static Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync(
Diagnostics\Service\DiagnosticAnalyzerService.cs (4)
67private ImmutableDictionary<HostAnalyzerInfoKey, HostAnalyzerInfo> _hostAnalyzerStateMap = ImmutableDictionary<HostAnalyzerInfoKey, HostAnalyzerInfo>.Empty; 73private ImmutableDictionary<(ProjectId projectId, IReadOnlyList<AnalyzerReference> analyzerReferences), ProjectAnalyzerInfo> _projectAnalyzerStateMap = ImmutableDictionary<(ProjectId projectId, IReadOnlyList<AnalyzerReference> analyzerReferences), ProjectAnalyzerInfo>.Empty;
Diagnostics\Service\DiagnosticAnalyzerService.HostAnalyzerInfo.cs (2)
118var analyzersPerReference = state.HostAnalyzers.GetOrCreateHostDiagnosticAnalyzersPerReference(language); 127ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> analyzersPerReference,
Diagnostics\Service\DiagnosticAnalyzerService.IncrementalMemberEditAnalyzer.cs (1)
54public async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDiagnosticsInProcessAsync(
Diagnostics\Service\DiagnosticAnalyzerService.ProjectStates.cs (1)
59var analyzersPerReference = solutionAnalyzers.CreateProjectDiagnosticAnalyzersPerReference(project.State);
Diagnostics\Service\DiagnosticAnalyzerService_ComputeDiagnosticAnalysisResults.cs (10)
25private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticAnalysisResultsInProcessAsync( 35var result = await ComputeDiagnosticsForAnalyzersAsync(analyzers).ConfigureAwait(false); 53async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> RemoveCompilerSemanticErrorsIfProjectNotLoadedAsync( 54ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result) 88async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticsForAnalyzersAsync( 93var result = ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>.Empty; 117async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> MergeProjectDiagnosticAnalyzerDiagnosticsAsync( 119ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result) 163void UpdateAnalyzerTelemetryData(ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> telemetry)
Diagnostics\Service\DiagnosticAnalyzerService_CoreAnalyze.cs (6)
57var builderMap = ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>.Empty; 60var map = await analysisResult.ToResultBuilderMapAsync( 66var result = builderMap.ToImmutableDictionary(kv => kv.Key, kv => DiagnosticAnalysisResult.CreateFromBuilder(kv.Value)); 67var telemetry = ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo>.Empty;
Diagnostics\Service\DiagnosticAnalyzerService_GetDiagnosticsForSpan.cs (2)
25private static async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDocumentDiagnosticsCoreInProcessAsync( 328var diagnosticsMap = await computeTask.ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_ProduceProjectDiagnostics.cs (3)
128var result = await GetOrComputeDiagnosticAnalysisResultsAsync(analyzers).ConfigureAwait(false); 166async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetOrComputeDiagnosticAnalysisResultsAsync( 173var result = await ComputeDiagnosticAnalysisResultsInProcessAsync(
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (6)
85var analyzersPerReferenceMap = solution.SolutionState.Analyzers.CreateDiagnosticAnalyzersPerReference(project); 105public async Task<ImmutableDictionary<ProjectId, ImmutableHashSet<string>>> GetAllDiagnosticIdsAsync( 111var list = await client.TryInvokeAsync<IRemoteDiagnosticAnalyzerService, ImmutableDictionary<ProjectId, ImmutableHashSet<string>>>( 131public async Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 137var map = await client.TryInvokeAsync<IRemoteDiagnosticAnalyzerService, ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptorData>>>( 143return ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>.Empty;
Diagnostics\Service\DocumentAnalysisExecutor.cs (6)
38private ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>? _lazySyntaxDiagnostics; 39private ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>? _lazySemanticDiagnostics; 165async ValueTask<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetAnalysisResultInProcessAsync( 191var analysisResult = await GetAnalysisResultInProcessAsync(analysisScope).ConfigureAwait(false); 222var syntaxDiagnostics = await GetAnalysisResultInProcessAsync(analysisScope).ConfigureAwait(false); 258var semanticDiagnostics = await GetAnalysisResultInProcessAsync(analysisScope).ConfigureAwait(false);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
5488var additionalReverse = bodyMap.AdditionalReverseMapping;
EditAndContinue\ActiveStatementsMap.cs (7)
22new(ImmutableDictionary<string, ImmutableArray<ActiveStatement>>.Empty, 23ImmutableDictionary<ManagedInstructionId, ActiveStatement>.Empty); 45private ImmutableDictionary<SyntaxTree, ImmutableArray<UnmappedActiveStatement>> _lazyOldDocumentActiveStatements; 56_lazyOldDocumentActiveStatements = ImmutableDictionary<SyntaxTree, ImmutableArray<UnmappedActiveStatement>>.Empty; 61ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> remapping) 93var byDocumentPath = updatedSpansByDocumentPath.ToImmutableDictionary( 121private static bool TryGetUpToDateSpan(ManagedActiveStatementDebugInfo activeStatementInfo, ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> remapping, out LinePositionSpan newSpan)
EditAndContinue\CommittedSolution.cs (5)
77private ImmutableDictionary<ProjectId, StaleProjectInfo> _staleProjects = ImmutableDictionary<ProjectId, StaleProjectInfo>.Empty; 135public ImmutableDictionary<ProjectId, StaleProjectInfo> StaleProjects 425public void CommitChanges(Solution solution, ImmutableDictionary<ProjectId, StaleProjectInfo> staleProjects) 431var oldStaleProjects = _staleProjects;
EditAndContinue\DebuggingSession.cs (5)
154nonRemappableRegions: ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>.Empty, 241internal void RestartEditSession(ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>? nonRemappableRegions, bool? inBreakState) 441private static ImmutableDictionary<K, ImmutableArray<V>> GroupToImmutableDictionary<K, V>(IEnumerable<IGrouping<K, V>> items) 526ImmutableDictionary<ProjectId, RunningProjectOptions> runningProjects, 592ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>? newNonRemappableRegions = null;
EditAndContinue\DeclarationBodyMap.cs (4)
17ImmutableDictionary<SyntaxNode, SyntaxNode>.Empty); 22public ImmutableDictionary<SyntaxNode, SyntaxNode> AdditionalReverseMapping { get; } 27ImmutableDictionary<SyntaxNode, SyntaxNode> additionalReverseMapping) 37=> new(match.Matches, match.ReverseMatches, ImmutableDictionary<SyntaxNode, SyntaxNode>.Empty);
EditAndContinue\EditAndContinueDebugInfoReader.cs (6)
29public abstract ImmutableDictionary<string, string> GetCompilationOptions(); 114public override ImmutableDictionary<string, string> GetCompilationOptions() 116=> ImmutableDictionary<string, string>.Empty; 126private ImmutableDictionary<string, string>? _lazyCompilationOptions; 169public override ImmutableDictionary<string, string> GetCompilationOptions() 177var options = GetCompilationOptions();
EditAndContinue\EditAndContinueService.cs (1)
213ImmutableDictionary<ProjectId, RunningProjectOptions> runningProjects,
EditAndContinue\EditSession.cs (9)
63internal readonly ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> NonRemappableRegions; 90ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> nonRemappableRegions, 750private static bool HasReferenceRudeEdits(ImmutableDictionary<string, OneOrMany<AssemblyIdentity>> oldReferencedAssemblies, Compilation newCompilation, ArrayBuilder<Diagnostic> projectDiagnostics) 936var treeMap = await GetPartialTypeDeclarationTreeMapAsync( 1037private static async ValueTask<ImmutableDictionary<SyntaxTree, SyntaxNode>> GetPartialTypeDeclarationTreeMapAsync( 1089ImmutableDictionary<ProjectId, RunningProjectOptions> runningProjects, 1135var staleProjects = oldSolution.StaleProjects; 1573out var projectsToRestart, 1639ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> previousNonRemappableRegions,
EditAndContinue\EmitSolutionUpdateResults.cs (7)
36public required ImmutableDictionary<ProjectId, ImmutableArray<ProjectId>> ProjectsToRestart { get; init; } 81public static Data CreateFromInternalError(Solution solution, string errorMessage, ImmutableDictionary<ProjectId, RunningProjectOptions> runningProjects) 110ProjectsToRestart = ImmutableDictionary<ProjectId, ImmutableArray<ProjectId>>.Empty, 137public required ImmutableDictionary<ProjectId, ImmutableArray<ProjectId>> ProjectsToRestart { get; init; } 159ProjectsToRestart = ImmutableDictionary<ProjectId, ImmutableArray<ProjectId>>.Empty, 203ImmutableDictionary<ProjectId, RunningProjectOptions> runningProjects, 204out ImmutableDictionary<ProjectId, ImmutableArray<ProjectId>> projectsToRestart,
EditAndContinue\IEditAndContinueService.cs (1)
22ValueTask<EmitSolutionUpdateResults> EmitSolutionUpdateAsync(DebuggingSessionId sessionId, Solution solution, ImmutableDictionary<ProjectId, RunningProjectOptions> runningProjects, ActiveStatementSpanProvider activeStatementSpanProvider, CancellationToken cancellationToken);
EditAndContinue\PdbMatchingSourceTextProvider.cs (1)
173public ImmutableDictionary<string, (DocumentState state, int solutionVersion)> GetDocumentsWithChangedLoaderByPath()
EditAndContinue\PendingSolutionUpdate.cs (2)
21ImmutableDictionary<ProjectId, StaleProjectInfo> staleProjects, 28public readonly ImmutableDictionary<ProjectId, StaleProjectInfo> StaleProjects = staleProjects;
EditAndContinue\ProjectBaseline.cs (2)
12internal sealed class ProjectBaseline(Guid moduleId, ProjectId projectId, EmitBaseline emitBaseline, ImmutableDictionary<string, OneOrMany<AssemblyIdentity>> initiallyReferencedAssemblies, int generation) 17public ImmutableDictionary<string, OneOrMany<AssemblyIdentity>> InitiallyReferencedAssemblies { get; } = initiallyReferencedAssemblies;
EditAndContinue\Remote\DebuggingSessionProxy.cs (1)
57ImmutableDictionary<ProjectId, RunningProjectOptions> runningProjects,
EditAndContinue\Remote\IRemoteEditAndContinueService.cs (1)
30ValueTask<EmitSolutionUpdateResults.Data> EmitSolutionUpdateAsync(Checksum solutionChecksum, RemoteServiceCallbackId callbackId, DebuggingSessionId sessionId, ImmutableDictionary<ProjectId, RunningProjectOptions> runningProjects, CancellationToken cancellationToken);
EditAndContinue\RunningProjectOptions.cs (2)
25public static ImmutableDictionary<ProjectId, RunningProjectOptions> ToRunningProjectOptions<TInfo>( 34var runningProjectsByPathAndTfm = runningProjects
EditAndContinue\SolutionUpdate.cs (6)
14ImmutableDictionary<ProjectId, StaleProjectInfo> staleProjects, 19ImmutableDictionary<ProjectId, ImmutableArray<ProjectId>> projectsToRestart, 24public readonly ImmutableDictionary<ProjectId, StaleProjectInfo> StaleProjects = staleProjects; 31public readonly ImmutableDictionary<ProjectId, ImmutableArray<ProjectId>> ProjectsToRestart = projectsToRestart; 38ImmutableDictionary<ProjectId, StaleProjectInfo> staleProjects, 47projectsToRestart: ImmutableDictionary<ProjectId, ImmutableArray<ProjectId>>.Empty,
EmbeddedLanguages\AbstractEmbeddedLanguageFeatureService.cs (1)
39private readonly ImmutableDictionary<string, ImmutableArray<Lazy<TService, EmbeddedLanguageMetadata>>> _identifierToServices;
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionAnalyzer.cs (4)
29private static readonly ImmutableDictionary<string, string?> s_strictProperties = 30ImmutableDictionary<string, string?>.Empty.Add(StrictKey, ""); 88var properties = strictTree != null && strictTree.Diagnostics.Length == 0 90: ImmutableDictionary<string, string?>.Empty;
EmbeddedLanguages\RegularExpressions\RegexParser.CaptureInfoAnalyzer.cs (7)
32private readonly ImmutableDictionary<int, TextSpan>.Builder _captureNumberToSpan; 33private readonly ImmutableDictionary<string, TextSpan>.Builder _captureNameToSpan; 50public static (ImmutableDictionary<string, TextSpan>, ImmutableDictionary<int, TextSpan>) Analyze( 57private (ImmutableDictionary<string, TextSpan>, ImmutableDictionary<int, TextSpan>) Analyze( 197ImmutableDictionary<T, TextSpan>.Builder mapping,
EmbeddedLanguages\RegularExpressions\RegexParser.cs (6)
81private readonly ImmutableDictionary<string, TextSpan> _captureNamesToSpan; 82private readonly ImmutableDictionary<int, TextSpan> _captureNumbersToSpan; 91ImmutableDictionary<string, TextSpan> captureNamesToSpan, 92ImmutableDictionary<int, TextSpan> captureNumbersToSpan) : this() 144ImmutableDictionary<string, TextSpan>.Empty, 145ImmutableDictionary<int, TextSpan>.Empty).ParseTree();
EmbeddedLanguages\RegularExpressions\RegexTree.cs (4)
16ImmutableDictionary<string, TextSpan> captureNamesToSpan, 17ImmutableDictionary<int, TextSpan> captureNumbersToSpan) : EmbeddedSyntaxTree<RegexKind, RegexNode, RegexCompilationUnit>(text, root, diagnostics) 19public readonly ImmutableDictionary<string, TextSpan> CaptureNamesToSpan = captureNamesToSpan; 20public readonly ImmutableDictionary<int, TextSpan> CaptureNumbersToSpan = captureNumbersToSpan;
Extensions\ExtensionFolder.cs (12)
15using HandlerMap = ImmutableDictionary<string, IExtensionMessageHandlerWrapper>; 37private ImmutableDictionary<string, AsyncLazy<AssemblyMessageHandlers>> _assemblyFilePathToHandlers = ImmutableDictionary<string, AsyncLazy<AssemblyMessageHandlers>>.Empty; 70DocumentMessageHandlers: HandlerMap.Empty, 71WorkspaceMessageHandlers: HandlerMap.Empty, 80DocumentMessageHandlers: HandlerMap.Empty, 81WorkspaceMessageHandlers: HandlerMap.Empty, 90var documentMessageHandlers = factory 93var workspaceMessageHandlers = factory 107DocumentMessageHandlers: HandlerMap.Empty, 108WorkspaceMessageHandlers: HandlerMap.Empty, 190var specificHandlers = isSolution ? handlers.WorkspaceMessageHandlers : handlers.DocumentMessageHandlers;
Extensions\ExtensionMessageHandlerService.cs (6)
24ImmutableDictionary<string, IExtensionMessageHandlerWrapper> DocumentMessageHandlers, 25ImmutableDictionary<string, IExtensionMessageHandlerWrapper> WorkspaceMessageHandlers, 46private ImmutableDictionary<string, ExtensionFolder> _folderPathToExtensionFolder = ImmutableDictionary<string, ExtensionFolder>.Empty; 152ImmutableDictionary<string, ExtensionFolder> oldFolderPathToExtensionFolder; 156_folderPathToExtensionFolder = ImmutableDictionary<string, ExtensionFolder>.Empty;
ExternalAccess\Pythia\Api\PythiaCompletionProviderBase.cs (2)
29ImmutableDictionary<string, string>? properties = null, 43ImmutableDictionary<string, string>? properties = null,
ExternalAccess\UnitTesting\API\UnitTestingHotReloadService.cs (1)
94.EmitSolutionUpdateAsync(sessionId, solution, runningProjects: ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty, s_solutionActiveStatementSpanProvider, cancellationToken)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (3)
32private ImmutableDictionary<string, ImmutableArray<Lazy<IUnitTestingIncrementalAnalyzerProvider, UnitTestingIncrementalAnalyzerProviderMetadata>>> _analyzerProviders; 213ImmutableDictionary<string, ImmutableArray<Lazy<IUnitTestingIncrementalAnalyzerProvider, UnitTestingIncrementalAnalyzerProviderMetadata>>> analyzerProviders) 256internal ref ImmutableDictionary<string, ImmutableArray<Lazy<IUnitTestingIncrementalAnalyzerProvider, UnitTestingIncrementalAnalyzerProviderMetadata>>> AnalyzerProviders
ExtractInterface\AbstractExtractInterfaceService.cs (2)
41ImmutableDictionary<ISymbol, SyntaxAnnotation> symbolToDeclarationAnnotationMap, 317ImmutableDictionary<ISymbol, SyntaxAnnotation> symbolToDeclarationAnnotationMap,
FindUsages\DefinitionItem.cs (7)
65public ImmutableDictionary<string, string> Properties { get; } 122ImmutableDictionary<string, string>? properties, 132Properties = properties ?? ImmutableDictionary<string, string>.Empty; 213ImmutableDictionary<string, string>? properties = null, 228ImmutableDictionary<string, string>? properties = null, 258ImmutableDictionary<string, string>? properties = null, 261properties ??= ImmutableDictionary<string, string>.Empty;
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
29ImmutableDictionary<string, string>? properties,
FindUsages\DefinitionItem.DetachedDefinitionItem.cs (2)
26ImmutableDictionary<string, string> properties, 41public readonly ImmutableDictionary<string, string> Properties = properties;
FindUsages\DefinitionItemFactory.cs (6)
125var properties = GetProperties(definition, isPrimary); 152internal static ImmutableDictionary<string, string> WithMetadataSymbolProperties(this ImmutableDictionary<string, string> properties, ISymbol symbol, ProjectId originatingProjectId) 265private static ImmutableDictionary<string, string> GetProperties(ISymbol definition, bool isPrimary) 267var properties = ImmutableDictionary<string, string>.Empty;
FindUsages\IRemoteFindUsagesService.cs (2)
194ImmutableDictionary<string, string> properties, 217public readonly ImmutableDictionary<string, string> Properties = properties;
GenerateType\AbstractGenerateTypeService.Editor.cs (2)
587ImmutableDictionary<string, ISymbol>.Builder parameterToFieldMap, 588ImmutableDictionary<string, string>.Builder parameterToNewFieldMap)
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
718properties: ImmutableDictionary<string, string>.Empty.WithMetadataSymbolProperties(symbol, originatingProjectId));
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (9)
105var renameTable = ComputeRenameTable( 224var replacementTable = ComputeReplacementTable( 251ImmutableDictionary<ISymbol, string> renameTable) 276ImmutableDictionary<ISymbol, string> renameTable, 288ImmutableDictionary<ISymbol, SyntaxNode> replacementTable, 321private ImmutableDictionary<ISymbol, SyntaxNode> ComputeReplacementTable( 324ImmutableDictionary<IParameterSymbol, TExpressionSyntax> parametersToReplace, 326ImmutableDictionary<ISymbol, string> renameTable) 350private static ImmutableDictionary<ISymbol, string> ComputeRenameTable(
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (4)
28ImmutableDictionary<IParameterSymbol, TExpressionSyntax> parametersToReplace, 124public ImmutableDictionary<IParameterSymbol, TExpressionSyntax> ParametersToReplace { get; } = parametersToReplace; 325var parameterToReplaceMap = 378var parameterToReplaceMap = allArgumentOperations
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
281var trackNodesDict = referenceLocations
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
221var newNameOriginalSymbolMapping = memberSymbols
MoveToNamespace\MoveToNamespaceResult.cs (2)
19public ImmutableDictionary<string, ISymbol> NewNameOriginalSymbolMapping { get; } 26ImmutableDictionary<string, ISymbol> newNameOriginalSymbolMapping)
PdbSourceDocument\DocumentDebugInfoReader.cs (1)
86public ImmutableDictionary<string, string> GetCompilationOptions()
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (3)
170ImmutableDictionary<string, string> pdbCompilationOptions; 297private ProjectInfo? CreateProjectInfo(Workspace workspace, Project project, ImmutableDictionary<string, string> pdbCompilationOptions, string assemblyName, string assemblyVersion, SourceHashAlgorithm checksumAlgorithm) 430public ImmutableDictionary<string, SourceDocumentInfo> Documents => _instance._fileToDocumentInfoMap.ToImmutableDictionary();
PreferFrameworkType\PreferFrameworkTypeConstants.cs (2)
12public static readonly ImmutableDictionary<string, string?> Properties = 13ImmutableDictionary<string, string?>.Empty.Add(PreferFrameworkType, "");
PullMemberUp\MembersPuller.cs (3)
101var symbolToDeclarationsMap = await InitializeSymbolToDeclarationsMapAsync(pullMemberUpOptions, cancellationToken).ConfigureAwait(false); 282var symbolToDeclarations = await InitializeSymbolToDeclarationsMapAsync(result, cancellationToken).ConfigureAwait(false); 468private static async Task<ImmutableDictionary<ISymbol, ImmutableArray<SyntaxNode>>> InitializeSymbolToDeclarationsMapAsync(
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (5)
89var definitionToBackingField = CreateDefinitionToBackingFieldMap(propertyReferences); 115private static ImmutableDictionary<IPropertySymbol, IFieldSymbol?> CreateDefinitionToBackingFieldMap(IEnumerable<ReferencedSymbol> propertyReferences) 194ImmutableDictionary<IPropertySymbol, IFieldSymbol?> propertyToBackingField, 214ImmutableDictionary<IPropertySymbol, IFieldSymbol?> propertyToBackingField, 297ImmutableDictionary<IPropertySymbol, IFieldSymbol?> definitionToBackingField,
SemanticSearch\SemanticSearchDefinitionItemFactory.cs (1)
52properties: ImmutableDictionary<string, string>.Empty.WithMetadataSymbolProperties(module.ContainingAssembly, originatingProjectId));
Shared\Utilities\AnnotatedSymbolMapping.cs (5)
16ImmutableDictionary<ISymbol, SyntaxAnnotation> symbolToDeclarationAnnotationMap, 18ImmutableDictionary<DocumentId, ImmutableArray<ISymbol>> documentIdsToSymbolMap, 25public ImmutableDictionary<ISymbol, SyntaxAnnotation> SymbolToDeclarationAnnotationMap { get; } = symbolToDeclarationAnnotationMap; 35public ImmutableDictionary<DocumentId, ImmutableArray<ISymbol>> DocumentIdsToSymbolMap { get; } = documentIdsToSymbolMap; 104var immutableDocumentIdToSymbolsMap = documentIdToSymbolsMap.ToImmutableDictionary(
src\roslyn\src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (2)
33protected static readonly ImmutableDictionary<string, string?> ModifiersAddedProperties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (5)
25private static readonly Dictionary<(bool includeInFixAll, string equivalenceKey), ImmutableDictionary<string, string?>> s_cachedProperties = []; 37var properties = ImmutableDictionary<string, string?>.Empty; 70private static ImmutableDictionary<string, string?> GetProperties(bool includeInFixAll, string equivalenceKey) 175var properties = GetProperties(includeInFixAll, equivalenceKey);
src\roslyn\src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (2)
25public static readonly ImmutableDictionary<string, string?> s_isFixableProperties = 26ImmutableDictionary<string, string?>.Empty.Add(ForEachCastHelpers.IsFixable, ForEachCastHelpers.IsFixable);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (14)
33/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 43ImmutableDictionary<string, string?>? properties, 114return CreateWithMessage(descriptor, location, notificationOption, analyzerOptions, additionalLocations, ImmutableDictionary<string, string?>.Empty, message); 116var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty 126ImmutableDictionary<string, string?>.Empty); 160ImmutableDictionary<string, string?>? properties, 182ImmutableDictionary<string, string?>? properties) 187var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty 208ImmutableDictionary<string, string?>? properties) 213properties ??= ImmutableDictionary<string, string?>.Empty; 255/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 265ImmutableDictionary<string, string?>? properties,
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
88properties: ImmutableDictionary<string, string?>.Empty.Add(MatchFolderAndNamespaceConstants.TargetNamespace, targetNamespace),
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
69var properties = ImmutableDictionary<string, string?>.Empty
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (2)
99var properties = ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
466if (analysisResult.SyntaxDiagnostics.TryGetValue(semanticModel.SyntaxTree, out var diagnostics)) 483static void AddAllDiagnostics(ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> diagnostics, ArrayBuilder<Diagnostic> reportedDiagnostics)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (2)
20private static readonly ImmutableDictionary<string, TargetScope> s_targetScopesMap = CreateTargetScopesMap(); 25private static ImmutableDictionary<string, TargetScope> CreateTargetScopesMap()
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (5)
19using PropertiesMap = ImmutableDictionary<(UnusedValuePreference preference, bool isUnusedLocalAssignment, bool isRemovableAssignment), 20ImmutableDictionary<string, string?>>; 93private static readonly PropertiesMap s_propertiesMap = CreatePropertiesMap(); 147private static PropertiesMap CreatePropertiesMap() 150ImmutableDictionary<string, string?>>();
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (3)
222var properties = s_propertiesMap[(_options.UnusedValueExpressionStatementPreference, isUnusedLocalAssignment: false, isRemovableAssignment: false)]; 587if (ShouldReportUnusedValueDiagnostic(symbol, unreadWriteOperation, symbolUsageResult, out var properties)) 608out ImmutableDictionary<string, string?>? properties)
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (9)
25private static readonly ImmutableDictionary<string, string?> s_takeCondition 26= ImmutableDictionary<string, string?>.Empty; 27private static readonly ImmutableDictionary<string, string?> s_negateCondition 29private static readonly ImmutableDictionary<string, string?> s_takeConditionOrWhenFalse 31private static readonly ImmutableDictionary<string, string?> s_negateConditionAndWhenFalse 33private static readonly ImmutableDictionary<string, string?> s_negateConditionOrWhenTrue 35private static readonly ImmutableDictionary<string, string?> s_takeConditionAndWhenTrue 37private static readonly ImmutableDictionary<string, string?> s_takeConditionAndWhenFalse 138void ReportDiagnostic(ImmutableDictionary<string, string?> properties)
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (2)
37var knownToStringFormats = Helpers.BuildKnownToStringFormatsLookupTable(compilation); 50ImmutableDictionary<IMethodSymbol, string> knownToStringFormats,
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (3)
31public ImmutableDictionary<IMethodSymbol, string> BuildKnownToStringFormatsLookupTable(Compilation compilation) 67ImmutableDictionary<IMethodSymbol, string> knownToStringFormats, 122ImmutableDictionary<IMethodSymbol, string> knownToStringFormats,
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
652var properties = ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (3)
186var properties = shouldUseCollectionExpression ? UseCollectionInitializerHelpers.UseCollectionExpressionProperties : ImmutableDictionary<string, string?>.Empty; 247ImmutableDictionary<string, string?>? properties)
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (2)
19public static readonly ImmutableDictionary<string, string?> UseCollectionExpressionProperties = 20ImmutableDictionary<string, string?>.Empty.Add(UseCollectionExpressionName, UseCollectionExpressionName);
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
29private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _binaryToAssignmentMap;
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (2)
21out ImmutableDictionary<TSyntaxKind, TSyntaxKind> binaryToAssignmentMap, 22out ImmutableDictionary<TSyntaxKind, TSyntaxKind> assignmentToTokenMap) where TSyntaxKind : struct
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (2)
20public static readonly ImmutableDictionary<string, string?> CanSimplifyProperties = 21ImmutableDictionary<string, string?>.Empty.Add(CanSimplifyName, CanSimplifyName);
src\roslyn\src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (2)
61var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
107var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (4)
66private static readonly ImmutableDictionary<string, string?> s_whenPartIsNullableProperties = 67ImmutableDictionary<string, string?>.Empty.Add(UseNullPropagationHelpers.WhenPartIsNullable, ""); 241var properties = whenPartIsNullable 243: ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (2)
145var properties = whenPartIsNullable 147: ImmutableDictionary<string, string?>.Empty;
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AnalysisResults.cs (4)
32public readonly struct ConditionalExpressionAnalysisResult(TExpressionSyntax conditionPartToCheck, TExpressionSyntax whenPartToCheck, ImmutableDictionary<string, string?> properties) 36public ImmutableDictionary<string, string?> Properties { get; } = properties; 39public readonly struct IfStatementAnalysisResult(TStatementSyntax trueStatement, TExpressionSyntax whenPartMatch, TStatementSyntax? nullAssignmentOpt, ImmutableDictionary<string, string?> properties) 44public ImmutableDictionary<string, string?> Properties { get; } = properties;
src\roslyn\src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (1)
85ImmutableDictionary<string, string?>.Empty));
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (7)
49private ImmutableDictionary<string, ISymbol>? _parameterToExistingMemberMap; 51public ImmutableDictionary<string, string> ParameterToNewFieldMap { get; private set; } 52public ImmutableDictionary<string, string> ParameterToNewPropertyMap { get; private set; } 61ParameterToNewFieldMap = ImmutableDictionary<string, string>.Empty; 62ParameterToNewPropertyMap = ImmutableDictionary<string, string>.Empty; 489var newMemberMap = 492ImmutableDictionary<string, string>.Empty;
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (3)
132ImmutableDictionary<string, ISymbol> parameterToExistingMemberMap, 133ImmutableDictionary<string, string> parameterToNewFieldMap, 134ImmutableDictionary<string, string> parameterToNewPropertyMap)> GetParametersAsync<TExpressionSyntax>(
src\roslyn\src\Analyzers\Core\CodeFixes\Options\FadingOptions.cs (1)
21private static readonly ImmutableDictionary<string, PerLanguageOption2<bool>> s_diagnosticToFadingOption = new Dictionary<string, PerLanguageOption2<bool>>
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
53var properties = diagnostic.Properties;
src\roslyn\src\Analyzers\Core\CodeFixes\RemoveRedundantEquality\RemoveRedundantEqualityCodeFixProvider.cs (1)
33ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\Core\CodeFixes\SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs (1)
55var knownToStringFormats = helpers.BuildKnownToStringFormatsLookupTable(semanticModel.Compilation);
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\UseAutoPropertyFixAllProvider.cs (1)
100var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false);
src\roslyn\src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
64ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\Core\CodeFixes\UseCompoundAssignment\AbstractUseCompoundAssignmentCodeFixProvider.cs (2)
28private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _binaryToAssignmentMap; 29private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _assignmentToTokenMap;
src\roslyn\src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (4)
76private static bool IsTrivialNullableValueAccess(ImmutableDictionary<string, string?> properties) 83ImmutableDictionary<string, string?> properties, 102ImmutableDictionary<string, string?> properties, 160ImmutableDictionary<string, string?> properties,
src\roslyn\src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
67ImmutableDictionary<string, string?> properties,
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (2)
903public static ImmutableDictionary<string, string> GetCompilationOptions(this MetadataReader pdbReader) 907return ImmutableDictionary<string, string>.Empty;
Structure\Syntax\AbstractBlockStructureProvider.cs (4)
21private readonly ImmutableDictionary<Type, ImmutableArray<AbstractSyntaxStructureProvider>> _nodeProviderMap; 22private readonly ImmutableDictionary<int, ImmutableArray<AbstractSyntaxStructureProvider>> _triviaProviderMap; 25ImmutableDictionary<Type, ImmutableArray<AbstractSyntaxStructureProvider>> defaultNodeOutlinerMap, 26ImmutableDictionary<int, ImmutableArray<AbstractSyntaxStructureProvider>> defaultTriviaOutlinerMap)
Structure\Syntax\BlockSpanCollector.cs (6)
16private readonly ImmutableDictionary<Type, ImmutableArray<AbstractSyntaxStructureProvider>> _nodeProviderMap; 17private readonly ImmutableDictionary<int, ImmutableArray<AbstractSyntaxStructureProvider>> _triviaProviderMap; 22ImmutableDictionary<Type, ImmutableArray<AbstractSyntaxStructureProvider>> nodeOutlinerMap, 23ImmutableDictionary<int, ImmutableArray<AbstractSyntaxStructureProvider>> triviaOutlinerMap, 35ImmutableDictionary<Type, ImmutableArray<AbstractSyntaxStructureProvider>> nodeOutlinerMap, 36ImmutableDictionary<int, ImmutableArray<AbstractSyntaxStructureProvider>> triviaOutlinerMap,
Structure\Syntax\BlockStructureExtensions.cs (1)
13this ImmutableDictionary<Type, ImmutableArray<AbstractSyntaxStructureProvider>>.Builder builder)
SyncNamespaces\AbstractSyncNamespacesService.cs (5)
42var diagnosticsByProject = await GetDiagnosticsByProjectAsync(projects, diagnosticAnalyzers, IsHostAnalyzer, cancellationToken).ConfigureAwait(false); 58private static async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetDiagnosticsByProjectAsync( 98ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject, 156private readonly ImmutableDictionary<Project, ImmutableArray<Diagnostic>> _diagnosticsByProject; 158internal DiagnosticProvider(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject)
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (5)
57var targetLibraryKeys = projectAssets.Targets 74ImmutableDictionary<string, ImmutableDictionary<string, string>> targetLibraryKeys, 99ImmutableDictionary<string, ImmutableDictionary<string, string>> targetLibraryKeys,
Microsoft.CodeAnalysis.Razor.Compiler (2)
SourceGenerators\RazorGeneratorResult.cs (2)
9internal sealed class RazorGeneratorResult(TagHelperCollection tagHelpers, ImmutableDictionary<string, (string hintName, RazorCodeDocument document)> filePathToDocument, ImmutableDictionary<string, string> hintNameToFilePath)
Microsoft.CodeAnalysis.ResxSourceGenerator (99)
AbstractResxGenerator.cs (6)
195var remappedNames = ImmutableDictionary<string, string>.Empty; 322private sealed class ImmutableDictionaryEqualityComparer<TKey, TValue> : IEqualityComparer<ImmutableDictionary<TKey, TValue>?> 327public bool Equals(ImmutableDictionary<TKey, TValue>? x, ImmutableDictionary<TKey, TValue>? y) 353public int GetHashCode(ImmutableDictionary<TKey, TValue>? obj)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (3)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer); 19internal readonly ImmutableDictionary<string, string> Options; 21public DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
687public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 698public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (10)
27ImmutableDictionary<string, string?>? properties, 35ImmutableDictionary<string, string?>? properties, 54ImmutableDictionary<string, string?>? properties, 64ImmutableDictionary<string, string?>? properties, 89ImmutableDictionary<string, string?>? properties, 102properties: ImmutableDictionary<string, string?>.Empty, 108ImmutableDictionary<string, string?>? properties, 116ImmutableDictionary<string, string?>? properties, 143ImmutableDictionary<string, string?>? properties, 169ImmutableDictionary<string, string?>? properties,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
70internal static int Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary) 78internal static void Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary, ref RoslynHashCode hashCode)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
31ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty); 34private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions; 36private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (19)
31private readonly ImmutableDictionary<string, TValue> _names; 32private readonly ImmutableDictionary<ISymbol, TValue> _symbols; 54private readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> _wildcardNamesBySymbolKind; 63private SymbolNamesWithValueOption(ImmutableDictionary<string, TValue> names, ImmutableDictionary<ISymbol, TValue> symbols, 64ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> wildcardNamesBySymbolKind) 75_names = ImmutableDictionary<string, TValue>.Empty; 76_symbols = ImmutableDictionary<ISymbol, TValue>.Empty; 77_wildcardNamesBySymbolKind = ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>>.Empty; 310if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 320if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 330if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) && 373internal ref readonly ImmutableDictionary<string, TValue> Names => ref _symbolNamesWithValueOption._names; 375internal ref readonly ImmutableDictionary<ISymbol, TValue> Symbols => ref _symbolNamesWithValueOption._symbols; 377internal ref readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> WildcardNamesBySymbolKind => ref _symbolNamesWithValueOption._wildcardNamesBySymbolKind;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (5)
20private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new(); 36var optionsMap = TryGetBackingOptionsDictionary(analyzerConfigOptions); 50static ImmutableDictionary<string, string>? TryGetBackingOptionsDictionary(AnalyzerConfigOptions analyzerConfigOptions) 56return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 57type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (3)
19public ImmutableDictionary<TKey, TValue> ToImmutableDictionaryAndFree<TKey, TValue>( 23ImmutableDictionary<TKey, TValue> result; 26result = ImmutableDictionary<TKey, TValue>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (3)
40public static ImmutableDictionary<CaptureId, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg) 49ImmutableDictionary<CaptureId, FlowCaptureKind>.Builder lvalueFlowCaptureIdBuilder = null; 80return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<CaptureId, FlowCaptureKind>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
197public ImmutableDictionary<CaptureId, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
13ImmutableDictionary<(ISymbol symbol, IOperation write), bool> symbolWritesMap, 33public ImmutableDictionary<(ISymbol symbol, IOperation write), bool> SymbolWritesMap { get; } = symbolWritesMap;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (5)
57var serializedNameMap = AssignNamesToNamingStyleElements(symbolSpecifications, namingStyles); 58var ruleNameMap = AssignNamesToNamingStyleRules(rules, serializedNameMap); 119private static ImmutableDictionary<Guid, string> AssignNamesToNamingStyleElements( 170private static ImmutableDictionary<NamingRule, string> AssignNamesToNamingStyleRules(ImmutableArray<NamingRule> namingRules, ImmutableDictionary<Guid, string> serializedNameMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
113=> CreateSerializerForEnum(map, ImmutableDictionary<string, T>.Empty); 119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum 130var alternativeMap = ImmutableDictionary<string, T>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 35!treeMap.TryGetValue((semanticModel.SyntaxTree, namespaceId), out var symbolMap))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (4)
20private readonly ImmutableDictionary<TKey, TValue> _forwardMap; 21private readonly ImmutableDictionary<TValue, TKey> _backwardMap; 35private BidirectionalMap(ImmutableDictionary<TKey, TValue> forwardMap, ImmutableDictionary<TValue, TKey> backwardMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\ImmutableDictionaryExtensions.cs (2)
12public static bool KeysEqual<TKey, TValue>(this ImmutableDictionary<TKey, TValue> self, ImmutableDictionary<TKey, TValue> other)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
158public static ImmutableDictionary<TKey, ImmutableHashSet<TValue>> MultiRemove<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
Microsoft.CodeAnalysis.Scripting (4)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (4)
35internal ImmutableDictionary<string, string> TrustedPlatformAssemblies; 84ImmutableDictionary<string, string> trustedPlatformAssemblies, 203internal static ImmutableDictionary<string, string> GetTrustedPlatformAssemblies(ImmutableArray<string> paths) 207return ImmutableDictionary<string, string>.Empty;
Microsoft.CodeAnalysis.VisualBasic (70)
Binding\DescendantBinderFactory.vb (4)
59Private _lazyNodeToBinderMap As ImmutableDictionary(Of SyntaxNode, BlockBaseBinder) 62Friend ReadOnly Property NodeToBinderMap As ImmutableDictionary(Of SyntaxNode, BlockBaseBinder) 71Private _lazyStmtListToBinderMap As ImmutableDictionary(Of SyntaxList(Of StatementSyntax), BlockBaseBinder) 74Friend ReadOnly Property StmtListToBinderMap As ImmutableDictionary(Of SyntaxList(Of StatementSyntax), BlockBaseBinder)
Binding\ExecutableCodeBinder.vb (2)
178Public ReadOnly Property NodeToBinderMap As ImmutableDictionary(Of SyntaxNode, BlockBaseBinder) 185Friend ReadOnly Property StmtListToBinderMap As ImmutableDictionary(Of SyntaxList(Of StatementSyntax), BlockBaseBinder)
Binding\LocalBinderBuilder.vb (6)
29Private _nodeMap As ImmutableDictionary(Of SyntaxNode, BlockBaseBinder) 30Private _listMap As ImmutableDictionary(Of SyntaxList(Of StatementSyntax), BlockBaseBinder) 40Public Sub New(enclosingMethod As MethodSymbol, nodeMap As ImmutableDictionary(Of SyntaxNode, BlockBaseBinder), listMap As ImmutableDictionary(Of SyntaxList(Of StatementSyntax), BlockBaseBinder)) 53Public ReadOnly Property NodeToBinderMap As ImmutableDictionary(Of SyntaxNode, BlockBaseBinder) 59Public ReadOnly Property StmtListToBinderMap As ImmutableDictionary(Of SyntaxList(Of StatementSyntax), BlockBaseBinder)
CommandLine\VisualBasicCommandLineParser.vb (3)
1809diagnosticBuilder As ArrayBuilder(Of Diagnostic)) As ImmutableDictionary(Of String, InternalSyntax.CConst) 1832Private Shared Function InternalDefinesToPublicSymbols(defines As ImmutableDictionary(Of String, InternalSyntax.CConst)) As IReadOnlyDictionary(Of String, Object) 1862Dim defines As ImmutableDictionary(Of String, InternalSyntax.CConst) = PublicSymbolsToInternalDefines(symbols, diagnosticBuilder)
Compilation\VisualBasicCompilation.vb (8)
92Private ReadOnly _syntaxTreeOrdinalMap As ImmutableDictionary(Of SyntaxTree, Integer) 104Private ReadOnly _rootNamespaces As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry) 423syntaxTreeOrdinalMap As ImmutableDictionary(Of SyntaxTree, Integer), 424rootNamespaces As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry), 529syntaxTreeOrdinalMap As ImmutableDictionary(Of SyntaxTree, Integer), 530rootNamespaces As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry), 982ByRef declMap As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry), 1051ByRef declMap As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry),
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
121Dim assemblyReferenceIdentityMap As ImmutableDictionary(Of AssemblyIdentity, AssemblyIdentity) = Nothing
Errors\ErrorFactories.vb (3)
18Private Shared ReadOnly s_categoriesMap As Lazy(Of ImmutableDictionary(Of ERRID, String)) = New Lazy(Of ImmutableDictionary(Of ERRID, String))(AddressOf CreateCategoriesMap) 20Private Shared Function CreateCategoriesMap() As ImmutableDictionary(Of ERRID, String)
Preprocessor\ExpressionEvaluator.vb (4)
17Private ReadOnly _symbols As ImmutableDictionary(Of String, CConst) 112Private Sub New(symbols As ImmutableDictionary(Of String, CConst)) 117Optional symbols As ImmutableDictionary(Of String, CConst) = Nothing) As CConst 132Optional symbols As ImmutableDictionary(Of String, CConst) = Nothing) As CConst
Scanner\Directives.vb (4)
269Private ReadOnly _symbols As ImmutableDictionary(Of String, CConst) 275Friend Sub New(symbols As ImmutableDictionary(Of String, CConst)) 281Private Sub New(symbols As ImmutableDictionary(Of String, CConst), 294Friend ReadOnly Property SymbolsMap As ImmutableDictionary(Of String, CConst)
Scanner\Scanner.vb (2)
150Friend Shared Function GetPreprocessorConstants(options As VisualBasicParseOptions) As ImmutableDictionary(Of String, CConst) 152Return ImmutableDictionary(Of String, CConst).Empty
Symbols\ReferenceManager.vb (2)
209Friend Function CreatePEAssemblyForAssemblyMetadata(metadata As AssemblyMetadata, importOptions As MetadataImportOptions, <Out> ByRef assemblyReferenceIdentityMap As ImmutableDictionary(Of AssemblyIdentity, AssemblyIdentity)) As PEAssemblySymbol 328ImmutableDictionary(Of AssemblyIdentity, PortableExecutableReference).Empty)
Syntax\SyntaxNodeFactories.vb (2)
76Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing, 89Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing,
Syntax\VisualBasicSyntaxTree.ConditionalSymbolsMap.vb (6)
28Private ReadOnly _conditionalsMap As ImmutableDictionary(Of String, Stack(Of Tuple(Of InternalSyntax.CConst, Integer))) 35Private Sub New(conditionalsMap As ImmutableDictionary(Of String, Stack(Of Tuple(Of InternalSyntax.CConst, Integer)))) 58Dim conditionalSymbolsMap As ImmutableDictionary(Of String, Stack(Of Tuple(Of InternalSyntax.CConst, Integer))) = symbolsMapBuilder.Build(syntaxRoot, options) 67Friend Function Build(root As SyntaxNodeOrToken, options As VisualBasicParseOptions) As ImmutableDictionary(Of String, Stack(Of Tuple(Of InternalSyntax.CConst, Integer))) 71Dim preprocessorSymbolsMap As ImmutableDictionary(Of String, InternalSyntax.CConst) = Scanner.GetPreprocessorConstants(options) 83Private Sub ProcessCommandLinePreprocessorSymbols(preprocessorSymbolsMap As ImmutableDictionary(Of String, InternalSyntax.CConst))
Syntax\VisualBasicSyntaxTree.DummySyntaxTree.vb (2)
55Public Overrides ReadOnly Property DiagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) 98Public Overrides Function WithDiagnosticOptions(options As ImmutableDictionary(Of String, ReportDiagnostic)) As SyntaxTree
Syntax\VisualBasicSyntaxTree.LazySyntaxTree.vb (4)
20Private ReadOnly _diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) 29diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic)) 101Public Overrides ReadOnly Property DiagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) 153Public Overrides Function WithDiagnosticOptions(options As ImmutableDictionary(Of String, ReportDiagnostic)) As SyntaxTree
Syntax\VisualBasicSyntaxTree.ParsedSyntaxTree.vb (4)
29Private ReadOnly _diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) 43diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic), 126Public Overrides ReadOnly Property DiagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) 173Public Overrides Function WithDiagnosticOptions(options As ImmutableDictionary(Of String, ReportDiagnostic)) As SyntaxTree
Syntax\VisualBasicSyntaxTree.vb (5)
167Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing) As SyntaxTree 242Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing, 252Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing, 269Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing, 285Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing,
VisualBasicCompilationOptions.vb (3)
815Protected Overrides Function CommonWithSpecificDiagnosticOptions(specificDiagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic)) As CompilationOptions 854Public Shadows Function WithSpecificDiagnosticOptions(value As ImmutableDictionary(Of String, ReportDiagnostic)) As VisualBasicCompilationOptions 856value = ImmutableDictionary(Of String, ReportDiagnostic).Empty
VisualBasicParseOptions.vb (5)
22Private _features As ImmutableDictionary(Of String, String) 45ImmutableDictionary(Of String, String).Empty) 53features As ImmutableDictionary(Of String, String)) 60_features = If(features, ImmutableDictionary(Of String, String).Empty) 233Return New VisualBasicParseOptions(Me) With {._features = ImmutableDictionary(Of String, String).Empty}
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeFixesAndRefactorings\VisualBasicFixAllSpanMappingService.vb (2)
22Protected Overrides Function GetFixAllSpansIfWithinGlobalStatementAsync(document As Document, diagnosticSpan As TextSpan, cancellationToken As CancellationToken) As Task(Of ImmutableDictionary(Of Document, ImmutableArray(Of TextSpan))) 24Return Task.FromResult(ImmutableDictionary(Of Document, ImmutableArray(Of TextSpan)).Empty)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
ExtractInterface\VisualBasicExtractInterfaceService.vb (1)
103symbolToDeclarationAnnotationMap As ImmutableDictionary(Of ISymbol, SyntaxAnnotation), cancellationToken As CancellationToken) As Task(Of Solution)
Structure\VisualBasicBlockStructureProvider.vb (2)
13Public Shared Function CreateDefaultNodeStructureProviderMap() As ImmutableDictionary(Of Type, ImmutableArray(Of AbstractSyntaxStructureProvider)) 60Public Shared Function CreateDefaultTriviaStructureProviderMap() As ImmutableDictionary(Of Integer, ImmutableArray(Of AbstractSyntaxStructureProvider))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
46Private ReadOnly _renameLocations As ImmutableDictionary(Of TextSpan, RenameLocation) 81Private ReadOnly _stringAndCommentTextSpans As ImmutableDictionary(Of TextSpan, ImmutableSortedSet(Of TextSpan))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeFixesAndRefactorings\VisualBasicFixAllSpanMappingService.vb (2)
22Protected Overrides Function GetFixAllSpansIfWithinGlobalStatementAsync(document As Document, diagnosticSpan As TextSpan, cancellationToken As CancellationToken) As Task(Of ImmutableDictionary(Of Document, ImmutableArray(Of TextSpan))) 24Return Task.FromResult(ImmutableDictionary(Of Document, ImmutableArray(Of TextSpan)).Empty)
Microsoft.CodeAnalysis.Workspaces (366)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (4)
80var documentToDiagnostics = await DetermineDiagnosticsAsync(fixAllContext, progressTracker).ConfigureAwait(false); 86private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> DetermineDiagnosticsAsync(FixAllContext fixAllContext, IProgress<CodeAnalysisProgress> progressTracker) 90var documentToDiagnostics = await fixAllContext.GetDocumentDiagnosticsToFixAsync().ConfigureAwait(false); 110ImmutableDictionary<Document, ImmutableArray<Diagnostic>> documentToDiagnostics)
CodeFixes\FixAllOccurrences\DocumentBasedFixAllProvider.cs (1)
80var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(fixAllContext).ConfigureAwait(false);
CodeFixes\FixAllOccurrences\FixAllContext.cs (2)
344internal Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync() 347internal Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync()
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (5)
43internal static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(FixAllContext fixAllContext) 45var result = await GetDocumentDiagnosticsToFixWorkerAsync(fixAllContext).ConfigureAwait(false); 50static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixWorkerAsync(FixAllContext fixAllContext) 67internal static async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync( 109return ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty;
CodeFixes\FixAllOccurrences\FixAllState.cs (2)
64ImmutableDictionary<Document, ImmutableArray<Diagnostic>> diagnosticsToFix, 86ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsToFix,
CodeFixes\FixAllOccurrences\FixAllState.FixMultipleDiagnosticProvider.cs (6)
21public ImmutableDictionary<Document, ImmutableArray<Diagnostic>> DocumentDiagnosticsMap { get; } 22public ImmutableDictionary<Project, ImmutableArray<Diagnostic>> ProjectDiagnosticsMap { get; } 24public FixMultipleDiagnosticProvider(ImmutableDictionary<Document, ImmutableArray<Diagnostic>> diagnosticsMap) 27ProjectDiagnosticsMap = ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty; 30public FixMultipleDiagnosticProvider(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsMap) 33DocumentDiagnosticsMap = ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty;
CodeFixesAndRefactorings\FixAllLogger.cs (2)
155public static void LogDiagnosticsStats(int correlationId, ImmutableDictionary<Document, ImmutableArray<Diagnostic>> documentsAndDiagnosticsToFixMap) 165public static void LogDiagnosticsStats(int correlationId, ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectsAndDiagnosticsToFixMap)
CodeRefactorings\FixAllOccurences\DocumentBasedRefactorAllProvider.cs (1)
92var documentsAndSpansToRefactor = await refactorAllContext.GetRefactorAllSpansAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\FixAllOccurences\RefactorAllContext.cs (1)
99public Task<ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>> GetRefactorAllSpansAsync(CancellationToken cancellationToken)
CodeRefactorings\FixAllOccurences\RefactorAllState.cs (4)
89internal async Task<ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>> GetRefactorAllSpansAsync(CancellationToken cancellationToken) 98return ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>.Empty; 100var spansByDocument = await spanMappingService.GetFixAllSpansAsync( 119return ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>.Empty;
Diagnostics\AbstractDiagnosticPropertiesService.cs (2)
13public ImmutableDictionary<string, string> GetAdditionalProperties(Diagnostic diagnostic) 18private static ImmutableDictionary<string, string> GetAdditionalProperties(
Diagnostics\DiagnosticAnalysisResult.cs (17)
29private readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> _syntaxLocals; 34private readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> _semanticLocals; 39private readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> _nonLocals; 48ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> syntaxLocals, 49ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> semanticLocals, 50ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> nonLocals, 70syntaxLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 71semanticLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 72nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 78ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> syntaxLocalMap, 79ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> semanticLocalMap, 80ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> nonLocalMap, 105private ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>? GetMap(AnalysisKind kind) 134var map = GetMap(kind); 151semanticLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 152nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 156private static void VerifyDocumentMap(Project project, ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> map)
Diagnostics\DiagnosticAnalysisResultBuilder.cs (5)
29public readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> SyntaxLocals => Convert(_lazySyntaxLocals); 30public readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> SemanticLocals => Convert(_lazySemanticLocals); 31public readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> NonLocals => Convert(_lazyNonLocals); 186private static ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> Convert(Dictionary<DocumentId, List<DiagnosticData>>? map) 189? ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty
Diagnostics\DiagnosticAnalysisResultMap.cs (8)
17ImmutableDictionary<TKey, TValue> analysisResult, 18ImmutableDictionary<TKey, AnalyzerTelemetryInfo> telemetryInfo) 29ImmutableDictionary<TKey, TValue>.Empty, 30ImmutableDictionary<TKey, AnalyzerTelemetryInfo>.Empty); 32public readonly ImmutableDictionary<TKey, TValue> AnalysisResult; 33public readonly ImmutableDictionary<TKey, AnalyzerTelemetryInfo> TelemetryInfo; 36ImmutableDictionary<TKey, TValue> analysisResult, 37ImmutableDictionary<TKey, AnalyzerTelemetryInfo> telemetryInfo)
Diagnostics\DiagnosticData.cs (7)
31ImmutableDictionary<string, string?> properties, 66public readonly ImmutableDictionary<string, string?> Properties = properties; 98internal static ImmutableDictionary<string, string?> PropertiesForBuildDiagnostic { get; } 99= ImmutableDictionary<string, string?>.Empty.Add(WellKnownDiagnosticPropertyNames.Origin, WellKnownDiagnosticTags.Build); 234var additionalProperties = GetAdditionalProperties(document, diagnostic); 260ImmutableDictionary<string, string?>? additionalProperties) 282private static ImmutableDictionary<string, string?>? GetAdditionalProperties(TextDocument document, Diagnostic diagnostic)
Diagnostics\Extensions.cs (3)
105public static async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>> ToResultBuilderMapAsync( 156ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>? diagnosticsByAnalyzerMap; 247ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> diagnosticsByAnalyzer,
Diagnostics\HostDiagnosticAnalyzers.cs (33)
23private readonly ImmutableDictionary<object, AnalyzerReference> _hostAnalyzerReferencesMap; 31private readonly ConcurrentDictionary<string, ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>> _hostDiagnosticAnalyzersPerLanguageMap; 40private readonly Lazy<ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>> _lazyHostDiagnosticAnalyzersPerReferenceMap; 45private ImmutableDictionary<string, DiagnosticAnalyzer> _compilerDiagnosticAnalyzerMap; 55private readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, StrongBox<ImmutableDictionary<string, SkippedHostAnalyzersInfo>>> _skippedHostAnalyzers = new(); 61_hostDiagnosticAnalyzersPerLanguageMap = new ConcurrentDictionary<string, ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>>(concurrencyLevel: 2, capacity: 2); 62_lazyHostDiagnosticAnalyzersPerReferenceMap = new Lazy<ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>>(() => CreateDiagnosticAnalyzersPerReferenceMap(_hostAnalyzerReferencesMap), isThreadSafe: true); 64_compilerDiagnosticAnalyzerMap = ImmutableDictionary<string, DiagnosticAnalyzer>.Empty; 75public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> GetOrCreateHostDiagnosticAnalyzersPerReference(string language) 81public ImmutableDictionary<ProjectId, ImmutableHashSet<string>> GetAllDiagnosticIds( 97var descriptorsPerReference = GetDiagnosticDescriptorsPerReference(infoCache, project); 112public ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsPerReference( 116var descriptorsPerReference = project is null 120var map = project is null 127private static ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> ConvertReferenceIdentityToName( 128ImmutableDictionary<object, ImmutableArray<DiagnosticDescriptor>> descriptorsPerReference, 129ImmutableDictionary<object, AnalyzerReference> map) 159public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateDiagnosticAnalyzersPerReference(Project project) 161var hostAnalyzerReferences = GetOrCreateHostDiagnosticAnalyzersPerReference(project.Language); 162var projectAnalyzerReferences = CreateProjectDiagnosticAnalyzersPerReference(project.AnalyzerReferences, project.Language); 171public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateProjectDiagnosticAnalyzersPerReference(ProjectState project) 174public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateProjectDiagnosticAnalyzersPerReference(IReadOnlyList<AnalyzerReference> projectAnalyzerReferences, string language) 191private ImmutableDictionary<object, AnalyzerReference> CreateProjectAnalyzerReferencesMap(IReadOnlyList<AnalyzerReference> projectAnalyzerReferences) 194private static ImmutableDictionary<object, ImmutableArray<DiagnosticDescriptor>> CreateDiagnosticDescriptorsPerReference( 196ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> analyzersMap) 215private ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateHostDiagnosticAnalyzersAndBuildMap(string language) 254private static ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateDiagnosticAnalyzersPerReferenceMap( 295private static ImmutableDictionary<object, AnalyzerReference> CreateAnalyzerReferencesMap(IEnumerable<AnalyzerReference> analyzerReferences) 314private static ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> MergeDiagnosticAnalyzerMap( 315ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> map1, 316ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> map2) 318var current = map1; 345box.Value ??= ImmutableDictionary<string, SkippedHostAnalyzersInfo>.Empty;
Diagnostics\IDiagnosticPropertiesService.cs (1)
12ImmutableDictionary<string, string> GetAdditionalProperties(Diagnostic diagnostic);
Diagnostics\IRemoteDiagnosticAnalyzerService.cs (2)
54ValueTask<ImmutableDictionary<ProjectId, ImmutableHashSet<string>>> GetAllDiagnosticIdsAsync( 57ValueTask<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptorData>>> GetDiagnosticDescriptorsPerReferenceAsync(
Diagnostics\SkippedHostAnalyzersInfo.cs (4)
23ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<string>>.Empty); 37public ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<string>> FilteredDiagnosticIdsForAnalyzers { get; } 41ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<string>> filteredDiagnosticIdsForAnalyzers) 110var filteredDiagnosticIdsForAnalyzers = partiallySkippedHostAnalyzersBuilder.ToImmutable();
Editing\SymbolEditor.cs (1)
129private ImmutableDictionary<string, ImmutableArray<ProjectId>> _assemblyNameToProjectIdMap;
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex.cs (1)
40public ImmutableDictionary<string, ImmutableArray<int>> ReceiverTypeNameToExtensionMemberMap
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex.ExtensionMethodInfo.cs (2)
16ImmutableDictionary<string, ImmutableArray<int>> receiverTypeNameToExtensionMethodMap) 44public readonly ImmutableDictionary<string, ImmutableArray<int>> ReceiverTypeNameToExtensionMemberMap { get; } = receiverTypeNameToExtensionMethodMap;
Log\FunctionIdExtensions.cs (1)
13private static readonly Lazy<ImmutableDictionary<FunctionId, string>> s_functionIdsToString = new(
Options\DocumentOptionSet.cs (3)
27private ImmutableDictionary<OptionKey, object?> _values; 30: this(configOptions, underlyingOptions, language, ImmutableDictionary<OptionKey, object?>.Empty) 34private DocumentOptionSet(StructuredAnalyzerConfigOptions? configOptions, OptionSet underlyingOptions, string language, ImmutableDictionary<OptionKey, object?> values)
Options\GlobalOptionService.cs (4)
29private ImmutableDictionary<OptionKey2, object?> _currentValues = ImmutableDictionary.Create<OptionKey2, object?>(); 91var currentValues = _currentValues; 119private static object? GetOption_NoLock(ref ImmutableDictionary<OptionKey2, object?> currentValues, OptionKey2 optionKey, ImmutableArray<IOptionPersister> persisters) 155var currentValues = _currentValues;
Options\LegacyWorkspaceOptionService.cs (1)
37private ImmutableDictionary<OptionKey, object?> _currentExternallyDefinedOptionValues = ImmutableDictionary.Create<OptionKey, object?>();
Options\SolutionOptionSet.cs (3)
24private ImmutableDictionary<OptionKey, object?> _values; 33ImmutableDictionary<OptionKey, object?> values, 42: this(globalOptions, values: ImmutableDictionary<OptionKey, object?>.Empty, changedOptionKeys: [])
Remote\RemoteServiceCallbackDispatchers.cs (1)
29private readonly ImmutableDictionary<Type, Lazy<IRemoteServiceCallbackDispatcher, ExportMetadata>> _callbackDispatchers = dispatchers.ToImmutableDictionary(d => d.Metadata.ServiceInterface);
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
780var allTextSpansInSingleSourceTree = renameLocations 785var stringAndCommentTextSpansInSingleSourceTree = renameLocations
Rename\ConflictEngine\MutableConflictResolution.cs (3)
151var documentToModifiedSpansMap = renamedSpansTracker.GetDocumentToModifiedSpansMap(); 152var documentToComplexifiedSpansMap = renamedSpansTracker.GetDocumentToComplexifiedSpansMap(); 153var documentToRelatedLocationsMap = this.RelatedLocations.GroupBy(loc => loc.DocumentId).ToImmutableDictionary(
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
232public ImmutableDictionary<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>> GetDocumentToModifiedSpansMap() 242public ImmutableDictionary<DocumentId, ImmutableArray<ComplexifiedSpan>> GetDocumentToComplexifiedSpansMap()
Rename\ConflictResolution.cs (10)
49private readonly ImmutableDictionary<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>> _documentToModifiedSpansMap; 50private readonly ImmutableDictionary<DocumentId, ImmutableArray<ComplexifiedSpan>> _documentToComplexifiedSpansMap; 51private readonly ImmutableDictionary<DocumentId, ImmutableArray<RelatedLocation>> _documentToRelatedLocationsMap; 65_documentToModifiedSpansMap = ImmutableDictionary<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>>.Empty; 66_documentToComplexifiedSpansMap = ImmutableDictionary<DocumentId, ImmutableArray<ComplexifiedSpan>>.Empty; 67_documentToRelatedLocationsMap = ImmutableDictionary<DocumentId, ImmutableArray<RelatedLocation>>.Empty; 76ImmutableDictionary<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>> documentToModifiedSpansMap, 77ImmutableDictionary<DocumentId, ImmutableArray<ComplexifiedSpan>> documentToComplexifiedSpansMap, 78ImmutableDictionary<DocumentId, ImmutableArray<RelatedLocation>> documentToRelatedLocationsMap) 103public ImmutableDictionary<TextSpan, TextSpan> GetModifiedSpanMap(DocumentId documentId)
Rename\IRemoteRenamerService.cs (6)
213ImmutableDictionary<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>> documentToModifiedSpansMap, 214ImmutableDictionary<DocumentId, ImmutableArray<ComplexifiedSpan>> documentToComplexifiedSpansMap, 215ImmutableDictionary<DocumentId, ImmutableArray<RelatedLocation>> documentToRelatedLocationsMap) 233public readonly ImmutableDictionary<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>> DocumentToModifiedSpansMap = documentToModifiedSpansMap; 236public readonly ImmutableDictionary<DocumentId, ImmutableArray<ComplexifiedSpan>> DocumentToComplexifiedSpansMap = documentToComplexifiedSpansMap; 239public readonly ImmutableDictionary<DocumentId, ImmutableArray<RelatedLocation>> DocumentToRelatedLocationsMap = documentToRelatedLocationsMap;
Rename\RenameRewriterParameters.cs (4)
21ImmutableDictionary<TextSpan, RenameLocation> renameLocations, 22ImmutableDictionary<TextSpan, ImmutableSortedSet<TextSpan>?> stringAndCommentTextSpans, 42internal readonly ImmutableDictionary<TextSpan, RenameLocation> RenameLocations = renameLocations; 47internal readonly ImmutableDictionary<TextSpan, ImmutableSortedSet<TextSpan>?> StringAndCommentTextSpans = stringAndCommentTextSpans;
Serialization\SerializationExtensions.cs (1)
32ImmutableDictionary<string, StructuredAnalyzerConfigOptions> => WellKnownSynchronizationKind.FallbackAnalyzerOptions,
Serialization\SerializerService.cs (4)
152Write(writer, (ImmutableDictionary<string, StructuredAnalyzerConfigOptions>)value); 163private static void Write(ObjectWriter writer, ImmutableDictionary<string, StructuredAnalyzerConfigOptions> optionsByLanguage) 197private static ImmutableDictionary<string, StructuredAnalyzerConfigOptions> ReadFallbackAnalyzerOptions(ObjectReader reader) 202return ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty;
Shared\Extensions\ILanguageMetadataExtensions.cs (2)
29public static ImmutableDictionary<string, ImmutableArray<Lazy<TInterface, TMetadata>>> ToPerLanguageMap<TInterface, TMetadata>(this IEnumerable<Lazy<TInterface, TMetadata>> services) 44public static ImmutableDictionary<string, ImmutableArray<Lazy<TInterface, TMetadata>>> ToPerLanguageMapWithMultipleLanguages<TInterface, TMetadata>(this IEnumerable<Lazy<TInterface, TMetadata>> services)
SourceGeneration\IRemoteSourceGenerationService.cs (1)
73ValueTask<ImmutableArray<ImmutableDictionary<string, object?>>> FetchAndClearTelemetryKeyValuePairsAsync(CancellationToken cancellationToken);
SourceGeneratorTelemetry\ISourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
22ImmutableArray<ImmutableDictionary<string, object?>> FetchKeysAndAndClear();
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (2)
65public ImmutableArray<ImmutableDictionary<string, object?>> FetchKeysAndAndClear() 67var arrayBuilder = ImmutableArray.CreateBuilder<ImmutableDictionary<string, object?>>();
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (3)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer); 19internal readonly ImmutableDictionary<string, string> Options; 21public DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
687public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 698public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (3)
40public static ImmutableDictionary<CaptureId, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg) 49ImmutableDictionary<CaptureId, FlowCaptureKind>.Builder lvalueFlowCaptureIdBuilder = null; 80return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<CaptureId, FlowCaptureKind>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
197public ImmutableDictionary<CaptureId, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
13ImmutableDictionary<(ISymbol symbol, IOperation write), bool> symbolWritesMap, 33public ImmutableDictionary<(ISymbol symbol, IOperation write), bool> SymbolWritesMap { get; } = symbolWritesMap;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (5)
57var serializedNameMap = AssignNamesToNamingStyleElements(symbolSpecifications, namingStyles); 58var ruleNameMap = AssignNamesToNamingStyleRules(rules, serializedNameMap); 119private static ImmutableDictionary<Guid, string> AssignNamesToNamingStyleElements( 170private static ImmutableDictionary<NamingRule, string> AssignNamesToNamingStyleRules(ImmutableArray<NamingRule> namingRules, ImmutableDictionary<Guid, string> serializedNameMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
113=> CreateSerializerForEnum(map, ImmutableDictionary<string, T>.Empty); 119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum 130var alternativeMap = ImmutableDictionary<string, T>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 35!treeMap.TryGetValue((semanticModel.SyntaxTree, namespaceId), out var symbolMap))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (4)
20private readonly ImmutableDictionary<TKey, TValue> _forwardMap; 21private readonly ImmutableDictionary<TValue, TKey> _backwardMap; 35private BidirectionalMap(ImmutableDictionary<TKey, TValue> forwardMap, ImmutableDictionary<TValue, TKey> backwardMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\ImmutableDictionaryExtensions.cs (2)
12public static bool KeysEqual<TKey, TValue>(this ImmutableDictionary<TKey, TValue> self, ImmutableDictionary<TKey, TValue> other)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
158public static ImmutableDictionary<TKey, ImmutableHashSet<TValue>> MultiRemove<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (6)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 41return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty.SetItem(document, documentDiagnostics); 55var documentsAndSpans = await spanMappingService.GetFixAllSpansAsync(document, 106return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty; 113static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetSpanDiagnosticsAsync( 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
41ImmutableDictionary<string, string?> properties,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (1)
32var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(fixAllContext).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
284ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewFieldMap, bool isContainedInUnsafeType) 306ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewPropertyMap, bool isContainedInUnsafeType)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
484ImmutableDictionary<string, ISymbol>? parameterToExistingMemberMap, 485ImmutableDictionary<string, string>? parameterToNewMemberMap,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
18private static readonly ImmutableDictionary<BinaryOperatorKind, BinaryOperatorKind> s_negatedBinaryMap =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (9)
59private ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> _semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 73var map = _semanticModelMap; 82_semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 113var originalMap = _semanticModelMap; 125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 138ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map, Document document, SyntaxNode bodyNode, CancellationToken cancellationToken) 175ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (2)
25private ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 26= ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (6)
27private ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 28= ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)>.Empty; 34private ImmutableDictionary<string, MefLanguageServices> _languageServicesMap 35= ImmutableDictionary<string, MefLanguageServices>.Empty; 74var allLanguageServices = Interlocked.Exchange(ref _languageServicesMap, _languageServicesMap.Clear()); 177var currentServicesMap = _languageServicesMap;
Workspace\Host\Metadata\MetadataReferenceCache.cs (2)
20private ImmutableDictionary<string, ReferenceSet> _referenceSets 21= ImmutableDictionary<string, ReferenceSet>.Empty;
Workspace\ProjectSystem\IRuleSetFile.cs (1)
16ImmutableDictionary<string, ReportDiagnostic> GetSpecificDiagnosticOptions();
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (4)
61private ImmutableDictionary<ProjectId, string?> _projectToMaxSupportedLangVersionMap = ImmutableDictionary<ProjectId, string?>.Empty; 64private ImmutableDictionary<ProjectId, string> _projectToDependencyNodeTargetIdentifier = ImmutableDictionary<ProjectId, string>.Empty;
Workspace\ProjectSystem\ProjectSystemProjectFactory.ProjectUpdateState.cs (8)
53ImmutableDictionary<string, ImmutableArray<ProjectId>> ProjectsByOutputPath, 54ImmutableDictionary<ProjectId, ProjectReferenceInformation> ProjectReferenceInfos, 61ImmutableDictionary<string, ImmutableArray<ProjectId>>.Empty.WithComparers(StringComparer.OrdinalIgnoreCase), 62ImmutableDictionary<ProjectId, ProjectReferenceInformation>.Empty, [], [], [], []); 79static ImmutableDictionary<string, ImmutableArray<ProjectId>> AddProject(string path, ProjectId projectId, ImmutableDictionary<string, ImmutableArray<ProjectId>> map) 99static ImmutableDictionary<string, ImmutableArray<ProjectId>> RemoveProject(string path, ProjectId projectId, ImmutableDictionary<string, ImmutableArray<ProjectId>> map)
Workspace\Solution\AnalyzerConfigData.cs (1)
24public readonly ImmutableDictionary<string, ReportDiagnostic> TreeOptions;
Workspace\Solution\ProjectDependencyGraph.cs (24)
35private readonly ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> _referencesMap; 45private ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? _lazyReverseReferencesMap; 56private ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> _transitiveReferencesMap; 57private ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> _reverseTransitiveReferencesMap; 69ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty, 71ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty, 72ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty, 78ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> referencesMap) 83transitiveReferencesMap: ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty, 84reverseTransitiveReferencesMap: ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty, 93ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> referencesMap, 94ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? reverseReferencesMap, 95ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> transitiveReferencesMap, 96ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> reverseTransitiveReferencesMap, 117private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> RemoveItemsWithEmptyValues( 118ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> map) 120ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Builder? builder = null; 160var referencesMap = referencedProjectIds.IsEmpty ? 214private ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeReverseReferencesMap() 274var currentMap = _transitiveReferencesMap; 326var currentMap = _reverseTransitiveReferencesMap; 490ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> referencesMap) 510ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> forwardReferencesMap, 511ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? reverseReferencesMap)
Workspace\Solution\ProjectDependencyGraph_AddProjectReference.cs (12)
35var newReferencesMap = ComputeNewReferencesMapForAdditionalProjectReferences(_referencesMap, projectId, referencedProjectIds); 37var newReverseReferencesMap = ComputeNewReverseReferencesMapForAdditionalProjectReferences(_lazyReverseReferencesMap, projectId, referencedProjectIds); 39var newTransitiveReferencesMap = ComputeNewTransitiveReferencesMapForAdditionalProjectReferences(_transitiveReferencesMap, projectId, referencedProjectIds); 41var newReverseTransitiveReferencesMap = ComputeNewReverseTransitiveReferencesMapForAdditionalProjectReferences(_reverseTransitiveReferencesMap, projectId, referencedProjectIds); 58private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReferencesMapForAdditionalProjectReferences( 59ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingReferencesMap, 78private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? ComputeNewReverseReferencesMapForAdditionalProjectReferences( 79ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? existingReverseReferencesMap, 99private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewTransitiveReferencesMapForAdditionalProjectReferences( 100ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingTransitiveReferencesMap, 155private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReverseTransitiveReferencesMapForAdditionalProjectReferences( 156ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingReverseTransitiveReferencesMap,
Workspace\Solution\ProjectDependencyGraph_RemoveAllProjectReferences.cs (12)
25var referencesMap = ComputeNewReferencesMapForRemovedAllProjectReferences(_referencesMap, projectId); 26var reverseReferencesMap = ComputeNewReverseReferencesMapForRemovedAllProjectReferences(_lazyReverseReferencesMap, projectId, referencedProjectIds); 27var transitiveReferencesMap = ComputeNewTransitiveReferencesMapForRemovedAllProjectReferences(_transitiveReferencesMap, projectId, referencedProjectIds); 28var reverseTransitiveReferencesMap = ComputeNewReverseTransitiveReferencesMapForRemovedAllProjectReferences(_reverseTransitiveReferencesMap, projectId); 40private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReferencesMapForRemovedAllProjectReferences( 41ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingForwardReferencesMap, 58private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? ComputeNewReverseReferencesMapForRemovedAllProjectReferences( 59ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? existingReverseReferencesMap, 77private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewTransitiveReferencesMapForRemovedAllProjectReferences( 78ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingTransitiveReferencesMap, 104private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReverseTransitiveReferencesMapForRemovedAllProjectReferences( 105ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingReverseTransitiveReferencesMap,
Workspace\Solution\ProjectDependencyGraph_RemoveProject.cs (14)
23var referencesMap = ComputeNewReferencesMapForRemovedProject( 30var reverseReferencesMap = ComputeNewReverseReferencesMapForRemovedProject( 34var transitiveReferencesMap = ComputeNewTransitiveReferencesMapForRemovedProject(_transitiveReferencesMap, removedProjectIds); 35var reverseTransitiveReferencesMap = ComputeNewReverseTransitiveReferencesMapForRemovedProject(_reverseTransitiveReferencesMap, removedProjectIds); 55private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReferencesMapForRemovedProject( 56ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingForwardReferencesMap, 57ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? existingReverseReferencesMap, 99private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? ComputeNewReverseReferencesMapForRemovedProject( 100ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingForwardReferencesMap, 101ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? existingReverseReferencesMap, 133private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewTransitiveReferencesMapForRemovedProject( 134ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingTransitiveReferencesMap, 167private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReverseTransitiveReferencesMapForRemovedProject( 168ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingReverseTransitiveReferencesMap,
Workspace\Solution\ProjectDependencyGraph_RemoveProjectReference.cs (12)
23var referencesMap = ComputeNewReferencesMapForRemovedProjectReference(_referencesMap, projectId, referencedProjectId); 24var reverseReferencesMap = ComputeNewReverseReferencesMapForRemovedProjectReference(_lazyReverseReferencesMap, projectId, referencedProjectId); 25var transitiveReferencesMap = ComputeNewTransitiveReferencesMapForRemovedProjectReference(_transitiveReferencesMap, projectId, referencedProjectId); 26var reverseTransitiveReferencesMap = ComputeNewReverseTransitiveReferencesMapForRemovedProjectReference(_reverseTransitiveReferencesMap, projectId, referencedProjectId); 38private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReferencesMapForRemovedProjectReference( 39ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingForwardReferencesMap, 55private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? ComputeNewReverseReferencesMapForRemovedProjectReference( 56ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? existingReverseReferencesMap, 68private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewTransitiveReferencesMapForRemovedProjectReference( 69ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingTransitiveReferencesMap, 95private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReverseTransitiveReferencesMapForRemovedProjectReference( 96ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingReverseTransitiveReferencesMap,
Workspace\Solution\Solution.cs (4)
62ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 519internal Solution WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options) 533var newFallbackOptions = this.FallbackAnalyzerOptions; 1746internal ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions => SolutionState.FallbackAnalyzerOptions;
Workspace\Solution\SolutionCompilationState.cs (2)
977/// <inheritdoc cref="SolutionState.WithFallbackAnalyzerOptions(ImmutableDictionary{string, StructuredAnalyzerConfigOptions})"/> 978public SolutionCompilationState WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options)
Workspace\Solution\SolutionInfo.cs (4)
50internal ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions { get; } 56ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 87=> Create(id, version, filePath, projects, analyzerReferences, ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty); 98ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions)
Workspace\Solution\SolutionState.cs (14)
57public ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions { get; } = ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty; 63internal ImmutableDictionary<string, int> ProjectCountByLanguage { get; } = ImmutableDictionary<string, int>.Empty; 83ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions, 84ImmutableDictionary<string, int> projectCountByLanguage, 120ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 130projectCountByLanguage: ImmutableDictionary<string, int>.Empty, 186ImmutableDictionary<string, int>? projectCountByLanguage = null, 191ImmutableDictionary<string, StructuredAnalyzerConfigOptions>? fallbackAnalyzerOptions = null, 521private static ImmutableDictionary<string, int> AddLanguageCounts(ImmutableDictionary<string, int> projectCountByLanguage, in TemporaryArray<(string language, int count)> languageCountDeltas) 941public SolutionState WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options) 1229var map = sortedNewProjectStates.Select(state => KeyValuePair.Create(
Workspace\Workspace.cs (3)
95fallbackAnalyzerOptions: ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty); 136private Solution CreateSolution(SolutionInfo solutionInfo, SolutionOptionSet options, IReadOnlyList<AnalyzerReference> analyzerReferences, ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 1016internal void OnSolutionFallbackAnalyzerOptionsChanged(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options)
Microsoft.CodeAnalysis.Workspaces.MSBuild (13)
MSBuild\BuildHostProcessManager.cs (3)
27private readonly ImmutableDictionary<string, string> _globalMSBuildProperties; 42ImmutableDictionary<string, string>? globalMSBuildProperties = null, 47_globalMSBuildProperties = globalMSBuildProperties ?? ImmutableDictionary<string, string>.Empty;
MSBuild\MSBuildProjectLoader.cs (3)
39ImmutableDictionary<string, string>? properties) 62public MSBuildProjectLoader(Workspace workspace, ImmutableDictionary<string, string>? properties = null) 80public ImmutableDictionary<string, string> Properties { get; private set; }
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (2)
50private readonly ImmutableDictionary<string, HashSet<int>> _pathToIndicesMap; 67private static ImmutableDictionary<string, HashSet<int>> CreatePathToIndexMap(ImmutableArray<MetadataReference> metadataReferences)
MSBuild\MSBuildWorkspace.cs (4)
38ImmutableDictionary<string, string> properties) 50return Create(ImmutableDictionary<string, string>.Empty); 69return Create(ImmutableDictionary<string, string>.Empty, hostServices); 110public ImmutableDictionary<string, string> Properties => _loader.Properties;
Rpc\RemoteBuildHost.cs (1)
45public Task ConfigureGlobalStateAsync(ImmutableArray<string> knownCommandLineParserLanguages, ImmutableDictionary<string, string> globalProperties, string? binlogPath, CancellationToken cancellationToken)
Microsoft.Diagnostics.DataContractReader.Contracts (3)
Contracts\StackWalk\Context\X86\GCInfoDecoding\GCInfo.cs (3)
63public ImmutableDictionary<int, List<BaseGcTransition>> Transitions => _transitions.Value; 64private readonly Lazy<ImmutableDictionary<int, List<BaseGcTransition>>> _transitions = new(); 156private ImmutableDictionary<int, List<BaseGcTransition>> DecodeTransitions()
Microsoft.DotNet.HotReload.Utils.Generator (2)
DocResolver.cs (2)
18private readonly ImmutableDictionary<string,DocumentId> docMap; 26private static ImmutableDictionary<string, DocumentId> BuildDocMap (IEnumerable<Document> docs)
Microsoft.DotNet.HotReload.Watch (27)
Build\EvaluationResult.cs (1)
41public static ImmutableDictionary<string, string> GetGlobalBuildProperties(IEnumerable<string> buildArguments, EnvironmentOptions environmentOptions)
Build\ProjectGraphFactory.cs (1)
19ImmutableDictionary<string, string> buildProperties,
HotReload\CompilationHandler.cs (15)
34private ImmutableDictionary<string, ImmutableArray<RunningProject>> _runningProjects 35= ImmutableDictionary<string, ImmutableArray<RunningProject>>.Empty.WithComparers(PathUtilities.OSSpecificPathComparer); 44private ImmutableDictionary<string, ImmutableArray<RestartOperation>> _activeProjectRelaunchOperations 45= ImmutableDictionary<string, ImmutableArray<RestartOperation>>.Empty.WithComparers(PathUtilities.OSSpecificPathComparer); 59private ImmutableDictionary<string, ImmutableArray<ProjectInstance>> _projectInstances 60= ImmutableDictionary<string, ImmutableArray<ProjectInstance>>.Empty.WithComparers(PathUtilities.OSSpecificPathComparer); 350var runningProjects = _runningProjects; 352var runningProjectInfos = 415ImmutableDictionary<string, ImmutableArray<RunningProject>> projectsToUpdate = []; 531private async ValueTask DisplayResultsAsync(HotReloadService.Updates updates, Solution solution, ImmutableDictionary<ProjectId, HotReloadService.RunningProjectInfo> runningProjectInfos, CancellationToken cancellationToken) 685var runningProjects = _runningProjects; 898var newRunningProjects = _runningProjects.Remove(projectPath, project); 957private static IEnumerable<RunningProject> GetCorrespondingRunningProjects(ImmutableDictionary<string, ImmutableArray<RunningProject>> runningProjects, Project project) 975private static IEnumerable<RunningProject> GetCorrespondingRunningProjects(ImmutableDictionary<string, ImmutableArray<RunningProject>> runningProjects, ProjectInstance project) 1008private static ImmutableDictionary<string, ImmutableArray<ProjectInstance>> CreateProjectInstanceMap(ProjectGraph graph)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\StaticWebAssetsManifest.cs (2)
17internal sealed class StaticWebAssetsManifest(ImmutableDictionary<string, string> urlToPathMap, ImmutableArray<StaticWebAssetPattern> discoveryPatterns) 52public ImmutableDictionary<string, string> UrlToPathMap { get; } = urlToPathMap;
UI\IReporter.cs (3)
139private static ImmutableDictionary<EventId, MessageDescriptor> s_descriptors = []; 173public static readonly ImmutableDictionary<string, Emoji> ComponentEmojis = ImmutableDictionary<string, Emoji>.Empty
Utilities\ImmutableDictionaryExtensions.cs (5)
10public static ImmutableDictionary<TKey, ImmutableArray<TValue>> Add<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value) 21public static ImmutableDictionary<TKey, ImmutableArray<TValue>> Remove<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value) 40public static Task ForEachValueAsync<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableArray<TValue>> dictionary, Func<TValue, CancellationToken, Task> action, CancellationToken cancellationToken)
Microsoft.DotNet.ProjectTools (22)
_generated\1\LaunchProfileJsonSerializerContext.ExecutableLaunchProfile.g.cs (4)
156var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Immutable.ImmutableDictionary<string, string>> 171AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("EnvironmentVariables", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Immutable.ImmutableDictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null), 174properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>>(options, info5); 224private static extern void __set_ExecutableLaunchProfile_EnvironmentVariables(global::Microsoft.DotNet.ProjectTools.LaunchProfile obj, global::System.Collections.Immutable.ImmutableDictionary<string, string> value);
_generated\2\LaunchProfileJsonSerializerContext.ProjectLaunchProfile.g.cs (4)
173var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Immutable.ImmutableDictionary<string, string>> 188AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("EnvironmentVariables", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Immutable.ImmutableDictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null), 191properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>>(options, info6); 232private static extern void __set_ProjectLaunchProfile_EnvironmentVariables(global::Microsoft.DotNet.ProjectTools.LaunchProfile obj, global::System.Collections.Immutable.ImmutableDictionary<string, string> value);
_generated\3\LaunchProfileJsonSerializerContext.ImmutableDictionaryStringString.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>>? _ImmutableDictionaryStringString; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>> ImmutableDictionaryStringString 22get => _ImmutableDictionaryStringString ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>>)Options.GetTypeInfo(typeof(global::System.Collections.Immutable.ImmutableDictionary<string, string>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>> Create_ImmutableDictionaryStringString(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Immutable.ImmutableDictionary<string, string>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Immutable.ImmutableDictionary<string, string>> 37jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateImmutableDictionaryInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>, string, string>(options, info, createRangeFunc: global::System.Collections.Immutable.ImmutableDictionary.CreateRange); 47private void ImmutableDictionaryStringStringSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Immutable.ImmutableDictionary<string, string>? value)
_generated\6\LaunchProfileJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
34if (type == typeof(global::System.Collections.Immutable.ImmutableDictionary<string, string>))
LaunchSettings\LaunchProfile.cs (1)
21public ImmutableDictionary<string, string> EnvironmentVariables
LaunchSettings\LaunchProfileParser.cs (2)
18protected static ImmutableDictionary<string, string> ParseEnvironmentVariables(ImmutableDictionary<string, string> values)
Microsoft.Interop.ComInterfaceGenerator (34)
Analyzers\AddGeneratedComClassFixer.cs (7)
72protected override Func<SolutionEditor, DocumentId, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions) 77protected override string GetDiagnosticTitle(ImmutableDictionary<string, Option> selectedOptions) 86protected override ImmutableDictionary<string, Option> ParseOptionsFromDiagnostic(Diagnostic diagnostic) 88return ImmutableDictionary<string, Option>.Empty; 91protected override ImmutableDictionary<string, Option> CombineOptions(ImmutableDictionary<string, Option> fixAllOptions, ImmutableDictionary<string, Option> diagnosticOptions) => fixAllOptions;
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
140ImmutableDictionary<string, string>.Builder properties = ImmutableDictionary.CreateBuilder<string, string>();
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (7)
28protected override string GetDiagnosticTitle(ImmutableDictionary<string, Option> selectedOptions) 35protected override Func<SolutionEditor, DocumentId, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions) 47protected override ImmutableDictionary<string, Option> ParseOptionsFromDiagnostic(Diagnostic diagnostic) 62protected override ImmutableDictionary<string, Option> CombineOptions(ImmutableDictionary<string, Option> fixAllOptions, ImmutableDictionary<string, Option> diagnosticOptions) 64ImmutableDictionary<string, Option> combinedOptions = fixAllOptions;
ComInterfaceGenerator.cs (1)
292ImmutableDictionary<string, string>.Empty.Add(GeneratorDiagnosticProperties.AddMarshalAsAttribute, "Error"),
GeneratedComInterfaceAttributeData.cs (1)
65var args = attr.NamedArguments.ToImmutableDictionary();
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (16)
27protected virtual IEnumerable<ConvertToSourceGeneratedInteropFix> CreateAllFixesForDiagnosticOptions(SyntaxNode node, ImmutableDictionary<string, Option> options) 33protected abstract Func<SolutionEditor, DocumentId, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions); 35protected abstract string GetDiagnosticTitle(ImmutableDictionary<string, Option> selectedOptions); 59public static ImmutableDictionary<string, Option> ParseOptionsFromEquivalenceKey(string equivalenceKey) 61ImmutableDictionary<string, Option>.Builder options = ImmutableDictionary.CreateBuilder<string, Option>(); 86public static string CreateEquivalenceKeyFromOptions(string baseEquivalenceKey, ImmutableDictionary<string, Option> options) 97protected abstract ImmutableDictionary<string, Option> ParseOptionsFromDiagnostic(Diagnostic diagnostic); 99protected abstract ImmutableDictionary<string, Option> CombineOptions(ImmutableDictionary<string, Option> fixAllOptions, ImmutableDictionary<string, Option> diagnosticOptions); 101private ImmutableDictionary<string, Option> GetOptionsForIndividualFix(ImmutableDictionary<string, Option> fixAllOptions, Diagnostic diagnostic) 129var options = ParseOptionsFromDiagnostic(diagnostic); 134var selectedOptions = fix.SelectedOptions.Add(Option.AllowUnsafe, new Option.Bool(true)); 161protected record struct ConvertToSourceGeneratedInteropFix(Func<SolutionEditor, DocumentId, CancellationToken, Task> ApplyFix, ImmutableDictionary<string, Option> SelectedOptions); 168var options = Option.ParseOptionsFromEquivalenceKey(fixAllContext.CodeActionEquivalenceKey);
VtableIndexStubGenerator.cs (1)
199var namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
Microsoft.Interop.LibraryImportGenerator (33)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
83ImmutableDictionary<string, string>.Builder properties = ImmutableDictionary.CreateBuilder<string, string>();
Analyzers\ConvertToLibraryImportFixer.cs (8)
37protected override string GetDiagnosticTitle(ImmutableDictionary<string, Option> selectedOptions) 56protected override ImmutableDictionary<string, Option> ParseOptionsFromDiagnostic(Diagnostic diagnostic) 71protected override ImmutableDictionary<string, Option> CombineOptions(ImmutableDictionary<string, Option> fixAllOptions, ImmutableDictionary<string, Option> diagnosticOptions) 76protected override IEnumerable<ConvertToSourceGeneratedInteropFix> CreateAllFixesForDiagnosticOptions(SyntaxNode node, ImmutableDictionary<string, Option> options) 83var selectedOptions = options.Remove(CharSetOption); 138protected override Func<SolutionEditor, DocumentId, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (2)
30public static ImmutableDictionary<string, string> CreateDiagnosticPropertiesForMissingMembersDiagnostic(MarshalMode mode, params string[] missingMemberNames) 33public static ImmutableDictionary<string, string> CreateDiagnosticPropertiesForMissingMembersDiagnostic(MarshalMode mode, IEnumerable<string> missingMemberNames)
Analyzers\DiagnosticReporter.cs (4)
12private readonly Action<DiagnosticDescriptor, ImmutableDictionary<string, string>, object[]> _diagnosticFactory; 14public DiagnosticReporter(Action<DiagnosticDescriptor, ImmutableDictionary<string, string>, object[]> createAndReportDiagnostic) 21public void CreateAndReportDiagnostic(DiagnosticDescriptor descriptor, params object[] messageArgs) => _diagnosticFactory(descriptor, ImmutableDictionary<string, string>.Empty, messageArgs); 23public void CreateAndReportDiagnostic(DiagnosticDescriptor descriptor, ImmutableDictionary<string, string> properties, params object[] messageArgs) => _diagnosticFactory(descriptor, properties, messageArgs);
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (1)
296ImmutableDictionary<string, TypedConstant> namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
LibraryImportGenerator.cs (1)
178ImmutableDictionary<string, TypedConstant> namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (16)
27protected virtual IEnumerable<ConvertToSourceGeneratedInteropFix> CreateAllFixesForDiagnosticOptions(SyntaxNode node, ImmutableDictionary<string, Option> options) 33protected abstract Func<SolutionEditor, DocumentId, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions); 35protected abstract string GetDiagnosticTitle(ImmutableDictionary<string, Option> selectedOptions); 59public static ImmutableDictionary<string, Option> ParseOptionsFromEquivalenceKey(string equivalenceKey) 61ImmutableDictionary<string, Option>.Builder options = ImmutableDictionary.CreateBuilder<string, Option>(); 86public static string CreateEquivalenceKeyFromOptions(string baseEquivalenceKey, ImmutableDictionary<string, Option> options) 97protected abstract ImmutableDictionary<string, Option> ParseOptionsFromDiagnostic(Diagnostic diagnostic); 99protected abstract ImmutableDictionary<string, Option> CombineOptions(ImmutableDictionary<string, Option> fixAllOptions, ImmutableDictionary<string, Option> diagnosticOptions); 101private ImmutableDictionary<string, Option> GetOptionsForIndividualFix(ImmutableDictionary<string, Option> fixAllOptions, Diagnostic diagnostic) 129var options = ParseOptionsFromDiagnostic(diagnostic); 134var selectedOptions = fix.SelectedOptions.Add(Option.AllowUnsafe, new Option.Bool(true)); 161protected record struct ConvertToSourceGeneratedInteropFix(Func<SolutionEditor, DocumentId, CancellationToken, Task> ApplyFix, ImmutableDictionary<string, Option> SelectedOptions); 168var options = Option.ParseOptionsFromEquivalenceKey(fixAllContext.CodeActionEquivalenceKey);
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DownlevelLibraryImportDiagnosticsAnalyzer.cs (1)
300ImmutableDictionary<string, TypedConstant> namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
DownlevelLibraryImportGenerator.cs (1)
164ImmutableDictionary<string, TypedConstant> namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
Microsoft.Interop.SourceGeneration (29)
DiagnosticExtensions.cs (8)
23ImmutableDictionary<string, string> properties, 45ImmutableDictionary<string, string> properties, 67ImmutableDictionary<string, string> properties, 106ImmutableDictionary<string, string> properties, 127ImmutableDictionary<string, string> properties, 149ImmutableDictionary<string, string> properties, 171ImmutableDictionary<string, string> properties, 210ImmutableDictionary<string, string> properties,
DiagnosticInfo.cs (2)
38public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location location, ImmutableDictionary<string, string>? properties, params object?[] messageArgs) 50public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location location, IEnumerable<Location>? additionalLocations, ImmutableDictionary<string, string>? properties, params object?[] messageArgs)
InteropAttributeData.cs (1)
55public static T WithValuesFromNamedArguments<T>(this T t, ImmutableDictionary<string, TypedConstant> namedArguments) where T : InteropAttributeCompilationData
ManualTypeMarshallingHelper.cs (1)
25ImmutableDictionary<MarshalMode, CustomTypeMarshallerData> Modes)
MarshalAsParser.cs (1)
173ImmutableDictionary<string, TypedConstant> namedArguments = ImmutableDictionary.CreateRange(attributeData.NamedArguments);
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (2)
24private static readonly ImmutableDictionary<string, string> AddDisableRuntimeMarshallingAttributeProperties = 25ImmutableDictionary<string, string>.Empty.Add(GeneratorDiagnosticProperties.AddDisableRuntimeMarshallingAttribute, GeneratorDiagnosticProperties.AddDisableRuntimeMarshallingAttribute);
Marshalling\BlittableMarshallerResolver.cs (2)
18private static readonly ImmutableDictionary<string, string> AddDisableRuntimeMarshallingAttributeProperties = 19ImmutableDictionary<string, string>.Empty.Add(GeneratorDiagnosticProperties.AddDisableRuntimeMarshallingAttribute, GeneratorDiagnosticProperties.AddDisableRuntimeMarshallingAttribute);
Marshalling\GeneratorDiagnostic.cs (2)
22public ImmutableDictionary<string, string> DiagnosticProperties { get; init; } = ImmutableDictionary<string, string>.Empty;
Marshalling\NoMarshallingInfoErrorResolver.cs (3)
33private NoMarshallingInfoErrorResolver(ImmutableDictionary<ManagedTypeInfo, string> customTypeToErrorMessageMap) 38public ImmutableDictionary<ManagedTypeInfo, string> CustomTypeToErrorMessageMap { get; } 40private static ImmutableDictionary<ManagedTypeInfo, string> DefaultTypeToErrorMessageMap(string stringMarshallingAttribute)
MarshallingAttributeInfo.cs (1)
187new CustomTypeMarshallers(ImmutableDictionary<MarshalMode, CustomTypeMarshallerData>.Empty.Add(
MarshalUsingAttributeParser.cs (1)
66ImmutableDictionary<string, TypedConstant> namedArgs = ImmutableDictionary.CreateRange(attributeData.NamedArguments);
SafeHandleMarshallingInfoProvider.cs (1)
79Modes = ImmutableDictionary<MarshalMode, CustomTypeMarshallerData>.Empty
UseSiteAttributeProvider.cs (2)
16private readonly ImmutableDictionary<int, UseSiteAttributeData> _useSiteAttributesByIndirectionDepth; 36ImmutableDictionary<int, UseSiteAttributeData>.Builder useSiteAttributesByIndirectionDepth = ImmutableDictionary.CreateBuilder<int, UseSiteAttributeData>();
ValueEqualityImmutableDictionary.cs (2)
11public record struct ValueEqualityImmutableDictionary<T, U>(ImmutableDictionary<T, U> Map) : IDictionary<T, U> 73public static ValueEqualityImmutableDictionary<TKey, TValue> ToValueEquals<TKey, TValue>(this ImmutableDictionary<TKey, TValue> source)
Microsoft.ML.Core (12)
Utilities\FuncMethodInfo1`1.cs (2)
26private ImmutableDictionary<Type, MethodInfo> _instanceMethodInfo; 31_instanceMethodInfo = ImmutableDictionary<Type, MethodInfo>.Empty;
Utilities\FuncMethodInfo1`2.cs (2)
27private ImmutableDictionary<Type, MethodInfo> _instanceMethodInfo; 32_instanceMethodInfo = ImmutableDictionary<Type, MethodInfo>.Empty;
Utilities\FuncMethodInfo1`3.cs (2)
28private ImmutableDictionary<Type, MethodInfo> _instanceMethodInfo; 33_instanceMethodInfo = ImmutableDictionary<Type, MethodInfo>.Empty;
Utilities\FuncMethodInfo2`3.cs (2)
28private ImmutableDictionary<(Type, Type), MethodInfo> _instanceMethodInfo; 33_instanceMethodInfo = ImmutableDictionary<(Type, Type), MethodInfo>.Empty;
Utilities\FuncMethodInfo3`2.cs (2)
27private ImmutableDictionary<(Type, Type, Type), MethodInfo> _instanceMethodInfo; 32_instanceMethodInfo = ImmutableDictionary<(Type, Type, Type), MethodInfo>.Empty;
Utilities\FuncMethodInfo3`3.cs (2)
28private ImmutableDictionary<(Type, Type, Type), MethodInfo> _instanceMethodInfo; 33_instanceMethodInfo = ImmutableDictionary<(Type, Type, Type), MethodInfo>.Empty;
Microsoft.ML.InternalCodeAnalyzer (2)
NameAnalyzer.cs (2)
35var props = ImmutableDictionary<string, string>.Empty
Microsoft.ML.Tests (10)
PermutationFeatureImportanceTests.cs (10)
41ImmutableDictionary<string, RegressionMetricsStatistics> pfiDict; 109ImmutableDictionary<string, RegressionMetricsStatistics> pfiDict; 183ImmutableDictionary<string, RegressionMetricsStatistics> pfiDict; 271ImmutableDictionary<string, RegressionMetricsStatistics> pfiDict; 346ImmutableDictionary<string, BinaryClassificationMetricsStatistics> pfiDict; 420ImmutableDictionary<string, BinaryClassificationMetricsStatistics> pfiDict; 528ImmutableDictionary<string, MulticlassClassificationMetricsStatistics> pfiDict; 601ImmutableDictionary<string, MulticlassClassificationMetricsStatistics> pfiDict; 679ImmutableDictionary<string, RankingMetricsStatistics> pfiDict; 748ImmutableDictionary<string, RankingMetricsStatistics> pfiDict;
Microsoft.ML.Transforms (5)
PermutationFeatureImportanceExtensions.cs (5)
127public static ImmutableDictionary<string, RegressionMetricsStatistics> 277public static ImmutableDictionary<string, BinaryClassificationMetricsStatistics> 431public static ImmutableDictionary<string, MulticlassClassificationMetricsStatistics> 593public static ImmutableDictionary<string, RankingMetricsStatistics> 651private static ImmutableDictionary<string, TResult>
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (1)
CachingWorkloadResolver.cs (1)
44public ImmutableDictionary<string, ResolutionResult> CachedResults { get; init; }
Microsoft.SourceLink.AzureDevOpsServer.Git (1)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.AzureRepos.Git (1)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.Bitbucket.Git (1)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.Common (1)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.Gitea (1)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.Gitee (1)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.GitHub (1)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.GitLab (1)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.SourceLink.GitWeb (1)
src\sourcelink\src\Common\Utilities\Hash.cs (1)
70internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.VisualStudio.TestPlatform.Common (3)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FastFilter.cs (3)
30internal FastFilter(ImmutableDictionary<string, ISet<string>> filterProperties, Operation filterOperation, Operator filterOperator) 53internal ImmutableDictionary<string, ISet<string>> FilterProperties { get; } 183private readonly ImmutableDictionary<string, ImmutableHashSet<string>.Builder>.Builder _filterDictionaryBuilder = ImmutableDictionary.CreateBuilder<string, ImmutableHashSet<string>.Builder>(StringComparer.OrdinalIgnoreCase);
NuGet.ProjectModel (4)
TargetFrameworkInformation.cs (4)
85_centralPackageVersions = value ?? ImmutableDictionary<string, CentralPackageVersion>.Empty; 111_packagesToPrune = value ?? ImmutableDictionary<string, PrunePackageReference>.Empty; 127CentralPackageVersions = ImmutableDictionary<string, CentralPackageVersion>.Empty; 129PackagesToPrune = ImmutableDictionary<string, PrunePackageReference>.Empty;
Roslyn.Diagnostics.Analyzers (137)
DiagnosticExtensions.cs (2)
26ImmutableDictionary<string, string?>? properties, 34ImmutableDictionary<string, string?>? properties,
ExportedPartsShouldHaveImportingConstructor.cs (5)
146var properties = Equals(constructor, missingImportingConstructor) ? ScenarioProperties.MissingAttribute : ScenarioProperties.MultipleConstructors; 164public static readonly ImmutableDictionary<string, string?> ImplicitConstructor = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(ImplicitConstructor)); 165public static readonly ImmutableDictionary<string, string?> NonPublicConstructor = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(NonPublicConstructor)); 166public static readonly ImmutableDictionary<string, string?> MissingAttribute = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MissingAttribute)); 167public static readonly ImmutableDictionary<string, string?> MultipleConstructors = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MultipleConstructors));
ImportingConstructorShouldBeObsolete.cs (5)
179public static readonly ImmutableDictionary<string, string?> MissingAttribute = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MissingAttribute)); 180public static readonly ImmutableDictionary<string, string?> MissingDescription = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MissingDescription)); 181public static readonly ImmutableDictionary<string, string?> IncorrectDescription = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(IncorrectDescription)); 182public static readonly ImmutableDictionary<string, string?> MissingError = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MissingError)); 183public static readonly ImmutableDictionary<string, string?> ErrorSetToFalse = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(ErrorSetToFalse));
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (3)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer); 19internal readonly ImmutableDictionary<string, string> Options; 21public DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
77internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
687public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 698public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 430/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 532/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 558/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 586/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (3)
20/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 24/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 34/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\roslyn\src\Dependencies\PooledObjects\PooledDictionary.cs (3)
29public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 31var result = this.ToImmutableDictionary(this.Comparer); 36public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (10)
27ImmutableDictionary<string, string?>? properties, 35ImmutableDictionary<string, string?>? properties, 54ImmutableDictionary<string, string?>? properties, 64ImmutableDictionary<string, string?>? properties, 89ImmutableDictionary<string, string?>? properties, 102properties: ImmutableDictionary<string, string?>.Empty, 108ImmutableDictionary<string, string?>? properties, 116ImmutableDictionary<string, string?>? properties, 143ImmutableDictionary<string, string?>? properties, 169ImmutableDictionary<string, string?>? properties,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\HashUtilities.cs (2)
70internal static int Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary) 78internal static void Combine<TKey, TValue>(ImmutableDictionary<TKey, TValue> dictionary, ref RoslynHashCode hashCode)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
31ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.Empty); 34private readonly ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> _perTreeOptions; 36private AggregateCategorizedAnalyzerConfigOptions(Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>? globalOptions, ImmutableDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>> perTreeOptions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (19)
31private readonly ImmutableDictionary<string, TValue> _names; 32private readonly ImmutableDictionary<ISymbol, TValue> _symbols; 54private readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> _wildcardNamesBySymbolKind; 63private SymbolNamesWithValueOption(ImmutableDictionary<string, TValue> names, ImmutableDictionary<ISymbol, TValue> symbols, 64ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> wildcardNamesBySymbolKind) 75_names = ImmutableDictionary<string, TValue>.Empty; 76_symbols = ImmutableDictionary<ISymbol, TValue>.Empty; 77_wildcardNamesBySymbolKind = ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>>.Empty; 310if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 320if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 330if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) && 373internal ref readonly ImmutableDictionary<string, TValue> Names => ref _symbolNamesWithValueOption._names; 375internal ref readonly ImmutableDictionary<ISymbol, TValue> Symbols => ref _symbolNamesWithValueOption._symbols; 377internal ref readonly ImmutableDictionary<SymbolKind, ImmutableDictionary<string, TValue>> WildcardNamesBySymbolKind => ref _symbolNamesWithValueOption._wildcardNamesBySymbolKind;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (5)
20private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new(); 36var optionsMap = TryGetBackingOptionsDictionary(analyzerConfigOptions); 50static ImmutableDictionary<string, string>? TryGetBackingOptionsDictionary(AnalyzerConfigOptions analyzerConfigOptions) 56return type.GetField("_backing", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string> ?? 57type.GetField("_analyzerOptions", flags)?.GetValue(analyzerConfigOptions) as ImmutableDictionary<string, string>;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (3)
19public ImmutableDictionary<TKey, TValue> ToImmutableDictionaryAndFree<TKey, TValue>( 23ImmutableDictionary<TKey, TValue> result; 26result = ImmutableDictionary<TKey, TValue>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (3)
40public static ImmutableDictionary<CaptureId, FlowCaptureKind> CreateLValueFlowCaptures(ControlFlowGraph cfg) 49ImmutableDictionary<CaptureId, FlowCaptureKind>.Builder lvalueFlowCaptureIdBuilder = null; 80return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable() : ImmutableDictionary<CaptureId, FlowCaptureKind>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
197public ImmutableDictionary<CaptureId, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
13ImmutableDictionary<(ISymbol symbol, IOperation write), bool> symbolWritesMap, 33public ImmutableDictionary<(ISymbol symbol, IOperation write), bool> SymbolWritesMap { get; } = symbolWritesMap;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (5)
57var serializedNameMap = AssignNamesToNamingStyleElements(symbolSpecifications, namingStyles); 58var ruleNameMap = AssignNamesToNamingStyleRules(rules, serializedNameMap); 119private static ImmutableDictionary<Guid, string> AssignNamesToNamingStyleElements( 170private static ImmutableDictionary<NamingRule, string> AssignNamesToNamingStyleRules(ImmutableArray<NamingRule> namingRules, ImmutableDictionary<Guid, string> serializedNameMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
113=> CreateSerializerForEnum(map, ImmutableDictionary<string, T>.Empty); 119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum 130var alternativeMap = ImmutableDictionary<string, T>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 35!treeMap.TryGetValue((semanticModel.SyntaxTree, namespaceId), out var symbolMap))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (4)
20private readonly ImmutableDictionary<TKey, TValue> _forwardMap; 21private readonly ImmutableDictionary<TValue, TKey> _backwardMap; 35private BidirectionalMap(ImmutableDictionary<TKey, TValue> forwardMap, ImmutableDictionary<TValue, TKey> backwardMap)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\ImmutableDictionaryExtensions.cs (2)
12public static bool KeysEqual<TKey, TValue>(this ImmutableDictionary<TKey, TValue> self, ImmutableDictionary<TKey, TValue> other)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
158public static ImmutableDictionary<TKey, ImmutableHashSet<TValue>> MultiRemove<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (4)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 41return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty.SetItem(document, documentDiagnostics); 106return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty; 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
41ImmutableDictionary<string, string?> properties,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (1)
32var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(fixAllContext).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
284ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewFieldMap, bool isContainedInUnsafeType) 306ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewPropertyMap, bool isContainedInUnsafeType)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
484ImmutableDictionary<string, ISymbol>? parameterToExistingMemberMap, 485ImmutableDictionary<string, string>? parameterToNewMemberMap,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
18private static readonly ImmutableDictionary<BinaryOperatorKind, BinaryOperatorKind> s_negatedBinaryMap =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (9)
59private ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> _semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 73var map = _semanticModelMap; 82_semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 113var originalMap = _semanticModelMap; 125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 138ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map, Document document, SyntaxNode bodyNode, CancellationToken cancellationToken) 175ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (2)
25private ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 26= ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)>.Empty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (6)
27private ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 28= ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)>.Empty; 34private ImmutableDictionary<string, MefLanguageServices> _languageServicesMap 35= ImmutableDictionary<string, MefLanguageServices>.Empty; 74var allLanguageServices = Interlocked.Exchange(ref _languageServicesMap, _languageServicesMap.Clear()); 177var currentServicesMap = _languageServicesMap;
Roslyn.Diagnostics.CSharp.Analyzers (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (4)
24protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 30return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty; 43return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty; 48return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty
Roslyn.Diagnostics.VisualBasic.Analyzers (3)
BasicInvokeTheCorrectPropertyToEnsureCorrectUseSiteDiagnostics.vb (1)
29Private Shared ReadOnly s_propertiesToValidateMap As ImmutableDictionary(Of String, String) = New Dictionary(Of String, String)(StringComparer.OrdinalIgnoreCase) From
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeFixesAndRefactorings\VisualBasicFixAllSpanMappingService.vb (2)
22Protected Overrides Function GetFixAllSpansIfWithinGlobalStatementAsync(document As Document, diagnosticSpan As TextSpan, cancellationToken As CancellationToken) As Task(Of ImmutableDictionary(Of Document, ImmutableArray(Of TextSpan))) 24Return Task.FromResult(ImmutableDictionary(Of Document, ImmutableArray(Of TextSpan)).Empty)
System.Collections.Immutable (148)
System\Collections\Immutable\IImmutableDictionaryInternal.cs (3)
9/// Determines whether the <see cref="ImmutableDictionary{TKey, TValue}"/> 13/// The value to locate in the <see cref="ImmutableDictionary{TKey, TValue}"/>. 17/// true if the <see cref="ImmutableDictionary{TKey, TValue}"/> contains
System\Collections\Immutable\ImmutableDictionary.cs (35)
11/// A set of initialization methods for instances of <see cref="ImmutableDictionary{TKey, TValue}"/>. 21public static ImmutableDictionary<TKey, TValue> Create<TKey, TValue>() where TKey : notnull 23return ImmutableDictionary<TKey, TValue>.Empty; 35public static ImmutableDictionary<TKey, TValue> Create<TKey, TValue>(IEqualityComparer<TKey>? keyComparer) where TKey : notnull 37return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer); 50public static ImmutableDictionary<TKey, TValue> Create<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 52return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer); 62public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 64return ImmutableDictionary<TKey, TValue>.Empty.AddRange(items); 79public static ImmutableDictionary<TKey, TValue> CreateRangeWithOverwrite<TKey, TValue>( 83return ImmutableDictionary<TKey, TValue>.Empty.AddRange(items, ImmutableDictionary<TKey, TValue>.KeyCollisionBehavior.SetValue); 94public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 96return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer).AddRange(items); 112public static ImmutableDictionary<TKey, TValue> CreateRangeWithOverwrite<TKey, TValue>( 117return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer).AddRange(items, ImmutableDictionary<TKey, TValue>.KeyCollisionBehavior.SetValue); 129public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 131return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(items); 140public static ImmutableDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>() where TKey : notnull 152public static ImmutableDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IEqualityComparer<TKey>? keyComparer) where TKey : notnull 165public static ImmutableDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 182public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 188return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer) 197public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this ImmutableDictionary<TKey, TValue>.Builder builder) where TKey : notnull 215public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 228public static ImmutableDictionary<TKey, TSource> ToImmutableDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) where TKey : notnull 242public static ImmutableDictionary<TKey, TSource> ToImmutableDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 257public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) where TKey : notnull 271public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 275if (source is ImmutableDictionary<TKey, TValue> existingDictionary) 280return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(source); 291public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 303public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source) where TKey : notnull
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (24)
12/// Contains the inner <see cref="ImmutableDictionary{TKey, TValue}.Builder"/> class. 22/// While <see cref="ImmutableDictionary{TKey, TValue}.AddRange(IEnumerable{KeyValuePair{TKey, TValue}})"/> 53private ImmutableDictionary<TKey, TValue>? _immutable; 61/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}.Builder"/> class. 64internal Builder(ImmutableDictionary<TKey, TValue> map) 93ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.AddRange(this, input); 408ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.Add(key, value, KeyCollisionBehavior.SetValue, this.Origin); 421ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.AddRange(items, this.Origin); 489public ImmutableDictionary<TKey, TValue> ToImmutable() 494return _immutable ??= ImmutableDictionary<TKey, TValue>.Wrap(_root, _comparers, _count); 511ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.Add(key, value, KeyCollisionBehavior.ThrowIfValueDifferent, this.Origin); 525return ImmutableDictionary<TKey, TValue>.ContainsKey(key, this.Origin); 529/// Determines whether the <see cref="ImmutableDictionary{TKey, TValue}"/> 533/// The value to locate in the <see cref="ImmutableDictionary{TKey, TValue}"/>. 537/// true if the <see cref="ImmutableDictionary{TKey, TValue}"/> contains 564ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.Remove(key, this.Origin); 579return ImmutableDictionary<TKey, TValue>.TryGetValue(key, this.Origin, out value!); 587return ImmutableDictionary<TKey, TValue>.TryGetKey(equalKey, this.Origin, out actualKey); 619return ImmutableDictionary<TKey, TValue>.Contains(item, this.Origin);
System\Collections\Immutable\ImmutableDictionary_2.Comparers.cs (1)
9/// Contains the inner <see cref="ImmutableDictionary{TKey, TValue}.Comparers"/> class.
System\Collections\Immutable\ImmutableDictionary_2.cs (43)
25public static readonly ImmutableDictionary<TKey, TValue> Empty = new ImmutableDictionary<TKey, TValue>(); 48/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}"/> class. 64/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}"/> class. 125public ImmutableDictionary<TKey, TValue> Clear() 172foreach (KeyValuePair<int, ImmutableDictionary<TKey, TValue>.HashBucket> bucket in _root) 189foreach (KeyValuePair<int, ImmutableDictionary<TKey, TValue>.HashBucket> bucket in _root) 300public ImmutableDictionary<TKey, TValue> Add(TKey key, TValue value) 304ImmutableDictionary<TKey, TValue>.MutationResult result = Add(key, value, KeyCollisionBehavior.ThrowIfValueDifferent, this.Origin); 311public ImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 318internal ImmutableDictionary<TKey, TValue> AddRange(ReadOnlySpan<KeyValuePair<TKey, TValue>> pairs, KeyCollisionBehavior collisionBehavior = KeyCollisionBehavior.ThrowIfValueDifferent) 326public ImmutableDictionary<TKey, TValue> SetItem(TKey key, TValue value) 330ImmutableDictionary<TKey, TValue>.MutationResult result = Add(key, value, KeyCollisionBehavior.SetValue, this.Origin); 339public ImmutableDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 343ImmutableDictionary<TKey, TValue>.MutationResult result = AddRange(items, this.Origin, KeyCollisionBehavior.SetValue); 350public ImmutableDictionary<TKey, TValue> Remove(TKey key) 354ImmutableDictionary<TKey, TValue>.MutationResult result = Remove(key, this.Origin); 361public ImmutableDictionary<TKey, TValue> RemoveRange(IEnumerable<TKey> keys) 366SortedInt32KeyNode<ImmutableDictionary<TKey, TValue>.HashBucket> root = _root; 374ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Remove(key, _comparers.KeyOnlyComparer, out result); 432public ImmutableDictionary<TKey, TValue> WithComparers(IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) 448ImmutableDictionary<TKey, TValue>.Comparers comparers = _comparers.WithValueComparer(valueComparer); 455var set = new ImmutableDictionary<TKey, TValue>(comparers); 464public ImmutableDictionary<TKey, TValue> WithComparers(IEqualityComparer<TKey>? keyComparer) 470/// Determines whether the <see cref="ImmutableDictionary{TKey, TValue}"/> 474/// The value to locate in the <see cref="ImmutableDictionary{TKey, TValue}"/>. 478/// true if the <see cref="ImmutableDictionary{TKey, TValue}"/> contains 835private static ImmutableDictionary<TKey, TValue> EmptyWithComparers(Comparers comparers) 845/// Attempts to discover an <see cref="ImmutableDictionary{TKey, TValue}"/> instance beneath some enumerable sequence 849/// <param name="other">Receives the concrete <see cref="ImmutableDictionary{TKey, TValue}"/> typed value if one can be found.</param> 851private static bool TryCastToImmutableMap(IEnumerable<KeyValuePair<TKey, TValue>> sequence, [NotNullWhen(true)] out ImmutableDictionary<TKey, TValue>? other) 853other = sequence as ImmutableDictionary<TKey, TValue>; 944ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Add(key, value, origin.KeyOnlyComparer, origin.ValueComparer, behavior, out result); 950SortedInt32KeyNode<ImmutableDictionary<TKey, TValue>.HashBucket> newRoot = UpdateRoot(origin.Root, hashCode, newBucket, origin.HashBucketComparer); 962SortedInt32KeyNode<ImmutableDictionary<TKey, TValue>.HashBucket> newRoot = origin.Root; 969ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Add(pair.Key, pair.Value, origin.KeyOnlyComparer, origin.ValueComparer, collisionBehavior, out result); 986SortedInt32KeyNode<ImmutableDictionary<TKey, TValue>.HashBucket> newRoot = origin.Root; 993ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Add(pair.Key, pair.Value, origin.KeyOnlyComparer, origin.ValueComparer, collisionBehavior, out result); 1014SortedInt32KeyNode<ImmutableDictionary<TKey, TValue>.HashBucket> newRoot = UpdateRoot(origin.Root, hashCode, bucket.Remove(key, origin.KeyOnlyComparer, out result), origin.HashBucketComparer); 1047private static ImmutableDictionary<TKey, TValue> Wrap(SortedInt32KeyNode<HashBucket> root, Comparers comparers, int count) 1061private ImmutableDictionary<TKey, TValue> Wrap(SortedInt32KeyNode<HashBucket>? root, int adjustedCountIfDifferentRoot) 1081private ImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs, bool avoidToHashMap) 1090if (TryCastToImmutableMap(pairs, out ImmutableDictionary<TKey, TValue>? other)) 1096ImmutableDictionary<TKey, TValue>.MutationResult result = AddRange(pairs, this.Origin);
System\Collections\Immutable\ImmutableDictionary_2.Enumerator.cs (2)
9/// Contains the inner <see cref="ImmutableDictionary{TKey, TValue}.Enumerator"/> struct. 39/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}.Enumerator"/> struct.
System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs (3)
11/// Contains the inner <see cref="ImmutableDictionary{TKey, TValue}.HashBucket"/> struct. 37/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}.HashBucket"/> struct. 354/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}.HashBucket.Enumerator"/> struct.
System\Collections\Immutable\ImmutableDictionary_2.MutationInput.cs (4)
9/// Contains the inner <see cref="ImmutableDictionary{TKey, TValue}.MutationInput"/> class. 30/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}.MutationInput"/> struct. 44/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}.MutationInput"/> struct. 47internal MutationInput(ImmutableDictionary<TKey, TValue> map)
System\Collections\Immutable\ImmutableDictionary_2.MutationResult.cs (5)
7/// Contains the inner <see cref="ImmutableDictionary{TKey, TValue}.MutationResult"/> class. 27/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}.MutationResult"/> struct. 37/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}.MutationResult"/> struct. 69internal ImmutableDictionary<TKey, TValue> Finalize(ImmutableDictionary<TKey, TValue> priorMap)
System\Collections\Immutable\ImmutableInterlocked.cs (28)
250public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 258ImmutableDictionary<TKey, TValue> map = Volatile.Read(ref location); 283public static TValue GetOrAdd<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) where TKey : notnull 287ImmutableDictionary<TKey, TValue> map = Volatile.Read(ref location); 309public static TValue GetOrAdd<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, TValue value) where TKey : notnull 311ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 322ImmutableDictionary<TKey, TValue> updatedCollection = priorCollection.Add(key, value); 323ImmutableDictionary<TKey, TValue> interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection); 344public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) where TKey : notnull 350ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 366ImmutableDictionary<TKey, TValue> updatedCollection = priorCollection.SetItem(key, newValue); 371ImmutableDictionary<TKey, TValue> interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection); 392public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory) where TKey : notnull 397ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 413ImmutableDictionary<TKey, TValue> updatedCollection = priorCollection.SetItem(key, newValue); 418ImmutableDictionary<TKey, TValue> interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection); 438public static bool TryAdd<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, TValue value) where TKey : notnull 440ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 451ImmutableDictionary<TKey, TValue> updatedCollection = priorCollection.Add(key, value); 452ImmutableDictionary<TKey, TValue> interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection); 470public static bool TryUpdate<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, TValue newValue, TValue comparisonValue) where TKey : notnull 473ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 486ImmutableDictionary<TKey, TValue> updatedCollection = priorCollection.SetItem(key, newValue); 487ImmutableDictionary<TKey, TValue> interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection); 504public static bool TryRemove<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, [MaybeNullWhen(false)] out TValue value) where TKey : notnull 506ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 517ImmutableDictionary<TKey, TValue> updatedCollection = priorCollection.Remove(key); 518ImmutableDictionary<TKey, TValue> interlockedResult = Interlocked.CompareExchange(ref location, updatedCollection, priorCollection);
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
115public INamedTypeSymbol? ImmutableDictionaryType => GetOrResolveType(typeof(ImmutableDictionary<,>), ref _ImmutableDictionaryType);