6 instantiations of ImmutableDictionary
System.Collections.Immutable (6)
System\Collections\Immutable\ImmutableDictionary_2.cs (6)
23public static readonly ImmutableDictionary<TKey, TValue> Empty = new ImmutableDictionary<TKey, TValue>(); 442return new ImmutableDictionary<TKey, TValue>(_root, comparers, _count); 448var set = new ImmutableDictionary<TKey, TValue>(comparers); 834: new ImmutableDictionary<TKey, TValue>(comparers); 1021return new ImmutableDictionary<TKey, TValue>(root, comparers, count); 1039return root.IsEmpty ? this.Clear() : new ImmutableDictionary<TKey, TValue>(root, _comparers, adjustedCountIfDifferentRoot);
2508 references to ImmutableDictionary
AnalyzerRunner (20)
CodeRefactoringRunner.cs (7)
29private readonly ImmutableDictionary<string, ImmutableArray<CodeRefactoringProvider>> _refactorings; 30private readonly ImmutableDictionary<string, ImmutableHashSet<int>> _syntaxKinds; 37var refactorings = GetCodeRefactoringProviders(options.AnalyzerPath); 125private static ImmutableDictionary<string, ImmutableHashSet<int>> GetSyntaxKinds(ImmutableHashSet<string> refactoringNodes) 153private static ImmutableDictionary<string, ImmutableArray<CodeRefactoringProvider>> FilterRefactorings(ImmutableDictionary<string, ImmutableArray<Lazy<CodeRefactoringProvider, CodeRefactoringProviderMetadata>>> refactorings, Options options) 199private static ImmutableDictionary<string, ImmutableArray<Lazy<CodeRefactoringProvider, CodeRefactoringProviderMetadata>>> GetCodeRefactoringProviders(string path)
DiagnosticAnalyzerRunner.cs (13)
27private readonly ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> _analyzers; 34var analyzers = GetDiagnosticAnalyzers(options.AnalyzerPath); 49var modifiedSpecificDiagnosticOptions = project.CompilationOptions.SpecificDiagnosticOptions 86var analysisResult = await GetAnalysisResultAsync(solution, _analyzers, _options, cancellationToken).ConfigureAwait(false); 178private static async Task<DocumentAnalyzerPerformance> TestDocumentPerformanceAsync(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, Project project, DocumentId documentId, Options analyzerOptionsInternal, CancellationToken cancellationToken) 232private static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> FilterAnalyzers(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, Options options) 285private static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> GetDiagnosticAnalyzers(string path) 304private static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> GetDiagnosticAnalyzersFromFile(string path) 309return ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty 314private static async Task<ImmutableDictionary<ProjectId, AnalysisResult>> GetAnalysisResultAsync( 316ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, 407internal static void WriteTelemetry(ImmutableDictionary<ProjectId, AnalysisResult> dictionary)
Aspire.Dashboard.Components.Tests (1)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
36Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty,
Aspire.Dashboard.Tests (1)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
36Properties = properties?.ToImmutableDictionary() ?? ImmutableDictionary<string, ResourcePropertyViewModel>.Empty,
BuildActionTelemetryTable (3)
Program.cs (1)
36private static ImmutableDictionary<string, string> CodeActionDescriptionMap { get; } = new Dictionary<string, string>()
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
ILLink.RoslynAnalyzer (10)
DataFlow\LocalDataFlowAnalysis.cs (3)
99 var lValueFlowCaptures = LValueFlowCapturesProvider.CreateLValueFlowCaptures (cfg); 107 var lValueFlowCaptures = LValueFlowCapturesProvider.CreateLValueFlowCaptures (cfg); 119 ImmutableDictionary<CaptureId, FlowCaptureKind> lValueFlowCaptures,
DataFlow\LocalDataFlowVisitor.cs (2)
49 private readonly ImmutableDictionary<CaptureId, FlowCaptureKind> lValueFlowCaptures; 64 ImmutableDictionary<CaptureId, FlowCaptureKind> lValueFlowCaptures,
DataFlow\LValueFlowCaptureProvider.cs (3)
51 public static ImmutableDictionary<CaptureId, FlowCaptureKind> CreateLValueFlowCaptures (ControlFlowGraph cfg) 60 ImmutableDictionary<CaptureId, FlowCaptureKind>.Builder? lvalueFlowCaptureIdBuilder = null; 85 return lvalueFlowCaptureIdBuilder != null ? lvalueFlowCaptureIdBuilder.ToImmutable () : ImmutableDictionary<CaptureId, FlowCaptureKind>.Empty;
TrimAnalysis\TrimAnalysisVisitor.cs (1)
51 ImmutableDictionary<CaptureId, FlowCaptureKind> lValueFlowCaptures,
TrimAnalysis\TrimDataFlowAnalysis.cs (1)
63 ImmutableDictionary<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.Components.Endpoints.Tests (6)
Binding\FormDataMapperTests.cs (6)
913var expected = ImmutableDictionary.CreateRange(new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }); 914CanDeserialize_Dictionary<ImmutableDictionary<int, int>, ImmutableDictionary<int, int>, int, int>(expected); 929var expected = ImmutableDictionary.CreateRange(new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }); 951var dictionary = Assert.IsType<ImmutableDictionary<int, int>>(result);
Microsoft.AspNetCore.Http.Extensions (14)
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\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.Server.HttpSys (1)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
749return ImmutableDictionary<int, ReadOnlyMemory<byte>>.Empty;
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
749return ImmutableDictionary<int, ReadOnlyMemory<byte>>.Empty;
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
749return ImmutableDictionary<int, ReadOnlyMemory<byte>>.Empty;
Microsoft.Build (31)
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
22return ImmutableDictionary<string, string?>.Empty;
BuildCheck\Infrastructure\EditorConfig\EditorConfigFile.cs (2)
161public Section(string name, ImmutableDictionary<string, string> properties) 177public ImmutableDictionary<string, string> Properties { get; }
Collections\CopyOnWritePropertyDictionary.cs (5)
42private static readonly ImmutableDictionary<string, T> NameComparerDictionaryPrototype = ImmutableDictionary.Create<string, T>(MSBuildNameIgnoreCaseComparer.Default); 47private ImmutableDictionary<string, T> _backing; 163ImmutableDictionary<string, T> thisBacking = _backing; 164ImmutableDictionary<string, T> thatBacking = other._backing; 208ImmutableDictionary<string, T> thisBacking = _backing;
CopyOnWriteDictionary.cs (9)
37private static readonly ImmutableDictionary<string, V> NameComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(MSBuildNameIgnoreCaseComparer.Default); 44private static readonly ImmutableDictionary<string, V> OrdinalIgnoreCaseComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(StringComparer.OrdinalIgnoreCase); 52private ImmutableDictionary<string, V> _backing; 59_backing = ImmutableDictionary<string, V>.Empty; 80var b = GetInitialDictionary((IEqualityComparer<string>?)comparer); 85private static ImmutableDictionary<string, V> GetInitialDictionary(IEqualityComparer<string>? keyComparer) 236ImmutableDictionary<string, V> initial = _backing; 290ImmutableDictionary<string, V> initial = _backing; 386ImmutableDictionary<string, V> snapshot = _backing;
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)
22private readonly ImmutableDictionary<string, LazyItemList> _referencedItemLists;
Graph\GraphBuilder.cs (3)
265ImmutableDictionary<string, string>.Builder solutionGlobalPropertiesBuilder = ImmutableDictionary.CreateBuilder( 308Dictionary<string, ImmutableDictionary<string, string>> globalPropertiesForProjectConfiguration = new(StringComparer.OrdinalIgnoreCase); 328if (!globalPropertiesForProjectConfiguration.TryGetValue(projectConfiguration.FullName, out ImmutableDictionary<string, string> projectGlobalProperties))
Graph\GraphBuildRequestData.cs (1)
230return 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;
Microsoft.Build.BuildCheck.UnitTests (14)
EditorConfig_Tests.cs (14)
780var properties = config.GlobalSection.Properties; 859var properties = config.GlobalSection.Properties; 875var properties = config.GlobalSection.Properties; 886var properties = config.GlobalSection.Properties; 912var properties = config.GlobalSection.Properties; 924var properties = config.GlobalSection.Properties; 936var properties = config.GlobalSection.Properties; 951var properties = config.GlobalSection.Properties; 966var properties = config.GlobalSection.Properties; 979var properties = config.GlobalSection.Properties; 992var properties = config.GlobalSection.Properties; 1004var properties = config.GlobalSection.Properties; 1018var properties = config.GlobalSection.Properties; 1035var properties = config.GlobalSection.Properties;
Microsoft.Build.Engine.UnitTests (1)
Graph\GraphTestingUtilities.cs (1)
20public static readonly ImmutableDictionary<string, string> EmptyGlobalProperties = new Dictionary<string, string> { { PropertyNames.IsGraphBuild, "true" } }.ToImmutableDictionary();
Microsoft.Build.Framework (12)
ImmutableSegmentedDictionary`2.cs (3)
18/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 22/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 32/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
ProjectStartedEventArgs.cs (1)
255? ImmutableDictionary<string, string>.Empty
RoslynImmutableInterlocked.cs (8)
266/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 286/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 306/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 334/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 372/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 408/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 434/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 462/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
Microsoft.Build.Tasks.Core (9)
CopyOnWriteDictionary.cs (9)
37private static readonly ImmutableDictionary<string, V> NameComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(MSBuildNameIgnoreCaseComparer.Default); 44private static readonly ImmutableDictionary<string, V> OrdinalIgnoreCaseComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(StringComparer.OrdinalIgnoreCase); 52private ImmutableDictionary<string, V> _backing; 59_backing = ImmutableDictionary<string, V>.Empty; 80var b = GetInitialDictionary((IEqualityComparer<string>?)comparer); 85private static ImmutableDictionary<string, V> GetInitialDictionary(IEqualityComparer<string>? keyComparer) 236ImmutableDictionary<string, V> initial = _backing; 290ImmutableDictionary<string, V> initial = _backing; 386ImmutableDictionary<string, V> snapshot = _backing;
Microsoft.Build.Utilities.Core (9)
CopyOnWriteDictionary.cs (9)
37private static readonly ImmutableDictionary<string, V> NameComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(MSBuildNameIgnoreCaseComparer.Default); 44private static readonly ImmutableDictionary<string, V> OrdinalIgnoreCaseComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(StringComparer.OrdinalIgnoreCase); 52private ImmutableDictionary<string, V> _backing; 59_backing = ImmutableDictionary<string, V>.Empty; 80var b = GetInitialDictionary((IEqualityComparer<string>?)comparer); 85private static ImmutableDictionary<string, V> GetInitialDictionary(IEqualityComparer<string>? keyComparer) 236ImmutableDictionary<string, V> initial = _backing; 290ImmutableDictionary<string, V> initial = _backing; 386ImmutableDictionary<string, V> snapshot = _backing;
Microsoft.CodeAnalysis (231)
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); 557var result = dict.ToImmutableDictionary(d => d.Key, d => d.Value.value, Section.PropertiesKeyComparer);
CommandLine\CommandLineParser.cs (1)
1396internal static ImmutableDictionary<string, string> ParseFeatures(List<string> features)
CommandLine\CommonCompiler.cs (2)
1027var options = sourceFileAnalyzerConfigOptions[i].AnalyzerOptions; 1042var options = additionalFileOptions[i].AnalyzerOptions;
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (2)
68public override ImmutableDictionary<string, string?> Properties => ImmutableDictionary<string, string?>.Empty;
Compilation\Compilation.cs (1)
119set = ImmutableDictionary<string, string>.Empty;
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)
62/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 69ImmutableDictionary<string, string?>? properties, 109/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 117ImmutableDictionary<string, string?>? properties, 137/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 146ImmutableDictionary<string, string?>? properties, 191/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 208ImmutableDictionary<string, string?>? properties = null) 241/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 259ImmutableDictionary<string, string?>? properties = null) 406/// Gets property bag for the diagnostic. it will return <see cref="ImmutableDictionary{TKey, TValue}.Empty"/> 410public virtual ImmutableDictionary<string, string?> Properties 411=> ImmutableDictionary<string, string?>.Empty;
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
81public override ImmutableDictionary<string, string?> Properties
Diagnostic\Diagnostic_SimpleDiagnostic.cs (6)
27private readonly ImmutableDictionary<string, string?> _properties; 37ImmutableDictionary<string, string?>? properties, 52_properties = properties ?? ImmutableDictionary<string, string?>.Empty; 63ImmutableDictionary<string, string?>? properties, 73ImmutableDictionary<string, string?>? properties, bool isSuppressed = false) 140public override ImmutableDictionary<string, string?> Properties
Diagnostic\DiagnosticInfo.cs (2)
33private static ImmutableDictionary<int, DiagnosticDescriptor> s_errorCodeToDescriptorMap = ImmutableDictionary<int, DiagnosticDescriptor>.Empty;
DiagnosticAnalyzer\AnalysisResult.cs (19)
23ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSyntaxDiagnostics, 24ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSemanticDiagnostics, 25ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localAdditionalFileDiagnostics, 26ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> nonLocalDiagnostics, 27ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> analyzerTelemetryInfo) 45public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> SyntaxDiagnostics { get; } 50public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> SemanticDiagnostics { get; } 55public ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> AdditionalFileDiagnostics { get; } 60public ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> CompilationDiagnostics { get; } 65public ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> AnalyzerTelemetryInfo { get; } 112ImmutableDictionary<T, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localDiagnostics, 132ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> nonLocalDiagnostics,
DiagnosticAnalyzer\AnalysisResultBuilder.cs (20)
24private static readonly ImmutableDictionary<string, OneOrMany<AdditionalText>> s_emptyPathToAdditionalTextMap = 25ImmutableDictionary<string, OneOrMany<AdditionalText>>.Empty.WithComparers(PathUtilities.Comparer); 34private readonly ImmutableDictionary<string, OneOrMany<AdditionalText>> _pathToAdditionalTextMap; 63private static ImmutableDictionary<string, OneOrMany<AdditionalText>> CreatePathToAdditionalTextMap(ImmutableArray<AdditionalText> additionalFiles) 503ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSyntaxDiagnostics; 504ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localSemanticDiagnostics; 505ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> localAdditionalFileDiagnostics; 506ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> nonLocalDiagnostics; 519var analyzerTelemetryInfo = GetTelemetryInfo(analyzers); 523private static ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> GetImmutable<TKey>( 531return ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>.Empty; 534var builder = ImmutableDictionary.CreateBuilder<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>(); 559private static ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> GetImmutable( 566return ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>.Empty; 585private ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> GetTelemetryInfo(
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
1066ImmutableDictionary<Diagnostic, ProgrammaticSuppressionInfo> programmaticSuppressionsByDiagnostic = createProgrammaticSuppressionsByDiagnosticMap(_programmaticSuppressions); 1152static ImmutableDictionary<Diagnostic, ProgrammaticSuppressionInfo> createProgrammaticSuppressionsByDiagnosticMap(ConcurrentSet<Suppression> programmaticSuppressions) 1450internal ImmutableDictionary<DiagnosticAnalyzer, TimeSpan> AnalyzerExecutionTimes => AnalyzerExecutor.AnalyzerExecutionTimes;
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
180internal ImmutableDictionary<DiagnosticAnalyzer, TimeSpan> AnalyzerExecutionTimes
DiagnosticAnalyzer\AnalyzerFileReference.cs (2)
375private ImmutableDictionary<string, ImmutableArray<TExtension>> _lazyExtensionsPerLanguage; 386_lazyExtensionsPerLanguage = ImmutableDictionary<string, ImmutableArray<TExtension>>.Empty;
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (2)
25private static ImmutableDictionary<LocalizableString, Exception?> s_localizableStringToException = ImmutableDictionary<LocalizableString, Exception?>.Empty.WithComparers(Roslyn.Utilities.ReferenceEqualityComparer.Instance);
DiagnosticAnalyzer\AnalyzerManager.cs (1)
357var diagnosticOptions = options.SpecificDiagnosticOptions;
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (3)
735(var analyzerActionCounts, var hasAnyActionsRequiringCompilationEvents) = await getAnalyzerActionCountsAsync( 830static async Task<(ImmutableDictionary<DiagnosticAnalyzer, AnalyzerActionCounts> analyzerActionCounts, bool hasAnyActionsRequiringCompilationEvents)> getAnalyzerActionCountsAsync( 855ImmutableDictionary<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)
36private readonly ConcurrentDictionary<ISymbol, ImmutableDictionary<string, SuppressMessageInfo>> _localSuppressionsBySymbol; 108_localSuppressionsBySymbol = new ConcurrentDictionary<ISymbol, ImmutableDictionary<string, SuppressMessageInfo>>(); 221var suppressions = _localSuppressionsBySymbol.GetOrAdd(symbol, this.DecodeLocalSuppressMessageAttributes); 277private ImmutableDictionary<string, SuppressMessageInfo> DecodeLocalSuppressMessageAttributes(ISymbol symbol) 283private static ImmutableDictionary<string, SuppressMessageInfo> DecodeLocalSuppressMessageAttributes(IEnumerable<AttributeData> attributes)
Emit\CommonPEModuleBuilder.cs (2)
129internal abstract ImmutableDictionary<ISymbolInternal, ImmutableArray<ISymbolInternal>> GetAllSynthesizedMembers(); 983internal 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\EnumerableExtensions.cs (2)
682public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 693public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
InternalUtilities\Hash.cs (1)
71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
InternalUtilities\ImmutableSetWithInsertionOrder`1.cs (3)
17private readonly ImmutableDictionary<T, uint> _map; 20private ImmutableSetWithInsertionOrder(ImmutableDictionary<T, uint> map, uint nextElementValue) 49var modifiedMap = _map.Remove(value);
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)
325(var sources, var generatorDiagnostics, var generatorRunStateTable, var hostOutputs) = context.ToImmutableAndFree();
SourceGeneration\GeneratorState.cs (18)
26ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 27ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 28ImmutableDictionary<string, object>.Empty, 41ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 42ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 43ImmutableDictionary<string, object>.Empty, 55ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> executedSteps, 56ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps, 57ImmutableDictionary<string, object> hostOutputs, 76ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> executedSteps, 77ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps, 78ImmutableDictionary<string, object> hostOutputs, 100ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 101ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 102ImmutableDictionary<string, object>.Empty, 123internal ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> ExecutedSteps { get; } 125internal ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> OutputSteps { get; } 127internal ImmutableDictionary<string, object> HostOutputs { get; }
SourceGeneration\IncrementalContexts.cs (2)
255internal readonly ImmutableDictionary<string, object>.Builder HostOutputBuilder; 266internal (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; } 151public ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> TrackedSteps { get; } 159public 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\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (3)
18/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 22/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 32/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\Dependencies\PooledObjects\PooledDictionary.cs (3)
24public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 26var result = this.ToImmutableDictionary(this.Comparer); 31public 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)
26protected internal static readonly ImmutableDictionary<string, ReportDiagnostic> EmptyDiagnosticOptions = 83public virtual ImmutableDictionary<string, ReportDiagnostic> DiagnosticOptions => EmptyDiagnosticOptions; 406public virtual SyntaxTree WithDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic> options)
Microsoft.CodeAnalysis.CodeStyle (121)
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (2)
15protected static readonly ImmutableDictionary<string, string?> ModifiersAddedProperties = ImmutableDictionary<string, string?>.Empty.Add(
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (5)
24private static readonly Dictionary<(bool includeInFixAll, string equivalenceKey), ImmutableDictionary<string, string?>> s_cachedProperties = []; 36var properties = ImmutableDictionary<string, string?>.Empty; 61private static ImmutableDictionary<string, string?> GetProperties(bool includeInFixAll, string equivalenceKey) 144var properties = GetProperties(includeInFixAll, equivalenceKey);
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (2)
26public static readonly ImmutableDictionary<string, string?> s_isFixableProperties = 27ImmutableDictionary<string, string?>.Empty.Add(ForEachCastHelpers.IsFixable, ForEachCastHelpers.IsFixable);
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (14)
36/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 46ImmutableDictionary<string, string?>? properties, 117return CreateWithMessage(descriptor, location, notificationOption, analyzerOptions, additionalLocations, ImmutableDictionary<string, string?>.Empty, message); 119var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty 129ImmutableDictionary<string, string?>.Empty); 163ImmutableDictionary<string, string?>? properties, 185ImmutableDictionary<string, string?>? properties) 190var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty 211ImmutableDictionary<string, string?>? properties) 216properties ??= ImmutableDictionary<string, string?>.Empty; 251/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 261ImmutableDictionary<string, string?>? properties,
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
88properties: ImmutableDictionary<string, string?>.Empty.Add(MatchFolderAndNamespaceConstants.TargetNamespace, targetNamespace),
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
71var properties = ImmutableDictionary<string, string?>.Empty
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (2)
100var properties = ImmutableDictionary<string, string?>.Empty;
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\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (2)
21private static readonly ImmutableDictionary<string, TargetScope> s_targetScopesMap = CreateTargetScopesMap(); 26private static ImmutableDictionary<string, TargetScope> CreateTargetScopesMap()
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (5)
20using PropertiesMap = ImmutableDictionary<(UnusedValuePreference preference, bool isUnusedLocalAssignment, bool isRemovableAssignment), 21ImmutableDictionary<string, string>>; 94private static readonly PropertiesMap s_propertiesMap = CreatePropertiesMap(); 151private static PropertiesMap CreatePropertiesMap() 154ImmutableDictionary<string, string>>();
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (3)
214var properties = s_propertiesMap[(_options.UnusedValueExpressionStatementPreference, isUnusedLocalAssignment: false, isRemovableAssignment: false)]; 571if (ShouldReportUnusedValueDiagnostic(symbol, unreadWriteOperation, symbolUsageResult, out var properties)) 592out ImmutableDictionary<string, string?>? properties)
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (9)
26private static readonly ImmutableDictionary<string, string?> s_takeCondition 27= ImmutableDictionary<string, string?>.Empty; 28private static readonly ImmutableDictionary<string, string?> s_negateCondition 30private static readonly ImmutableDictionary<string, string?> s_takeConditionOrWhenFalse 32private static readonly ImmutableDictionary<string, string?> s_negateConditionAndWhenFalse 34private static readonly ImmutableDictionary<string, string?> s_negateConditionOrWhenTrue 36private static readonly ImmutableDictionary<string, string?> s_takeConditionAndWhenTrue 38private static readonly ImmutableDictionary<string, string?> s_takeConditionAndWhenFalse 139void ReportDiagnostic(ImmutableDictionary<string, string?> properties)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
653var properties = ImmutableDictionary<string, string?>.Empty;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (3)
185var properties = shouldUseCollectionExpression ? UseCollectionInitializerHelpers.UseCollectionExpressionProperties : ImmutableDictionary<string, string?>.Empty; 246ImmutableDictionary<string, string?>? properties)
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (2)
19public static readonly ImmutableDictionary<string, string?> UseCollectionExpressionProperties = 20ImmutableDictionary<string, string?>.Empty.Add(UseCollectionExpressionName, UseCollectionExpressionName);
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
29private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _binaryToAssignmentMap;
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (2)
21out ImmutableDictionary<TSyntaxKind, TSyntaxKind> binaryToAssignmentMap, 22out ImmutableDictionary<TSyntaxKind, TSyntaxKind> assignmentToTokenMap) where TSyntaxKind : struct
src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (2)
16public static readonly ImmutableDictionary<string, string?> CanSimplifyProperties = 17ImmutableDictionary<string, string?>.Empty.Add(CanSimplifyName, CanSimplifyName);
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (2)
61var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
107var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (4)
52private static readonly ImmutableDictionary<string, string?> s_whenPartIsNullableProperties = 53ImmutableDictionary<string, string?>.Empty.Add(UseNullPropagationConstants.WhenPartIsNullable, ""); 183var properties = whenPartIsNullable 185: ImmutableDictionary<string, string?>.Empty;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (2)
90var properties = whenPartIsNullable 92: ImmutableDictionary<string, string?>.Empty;
src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (1)
85ImmutableDictionary<string, string?>.Empty));
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\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (2)
682public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 693public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (3)
18/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 22/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 32/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\Dependencies\PooledObjects\PooledDictionary.cs (3)
24public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 26var result = this.ToImmutableDictionary(this.Comparer); 31public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
181public ImmutableDictionary<CaptureId, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
15ImmutableDictionary<(ISymbol symbol, IOperation write), bool> symbolWritesMap, 35public ImmutableDictionary<(ISymbol symbol, IOperation write), bool> SymbolWritesMap { get; } = symbolWritesMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (5)
55var serializedNameMap = AssignNamesToNamingStyleElements(symbolSpecifications, namingStyles); 56var ruleNameMap = AssignNamesToNamingStyleRules(serializableNamingRules, serializedNameMap); 107private static ImmutableDictionary<Guid, string> AssignNamesToNamingStyleElements( 159private static ImmutableDictionary<SerializableNamingRule, string> AssignNamesToNamingStyleRules(ImmutableArray<SerializableNamingRule> namingRules, ImmutableDictionary<Guid, string> serializedNameMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
110=> CreateSerializerForEnum(map, ImmutableDictionary<string, T>.Empty); 116public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum 127var alternativeMap = ImmutableDictionary<string, T>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
15using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 37!treeMap.TryGetValue((semanticModel.SyntaxTree, namespaceId), out var symbolMap))
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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders)
Microsoft.CodeAnalysis.CodeStyle.Fixes (30)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (10)
57private ImmutableDictionary<string, ISymbol>? _parameterToExistingMemberMap; 59public ImmutableDictionary<string, string> ParameterToNewFieldMap { get; private set; } 60public ImmutableDictionary<string, string> ParameterToNewPropertyMap { get; private set; } 71ParameterToNewFieldMap = ImmutableDictionary<string, string>.Empty; 72ParameterToNewPropertyMap = ImmutableDictionary<string, string>.Empty; 450ImmutableDictionary<string, ISymbol>.Builder parameterToExistingMemberMap, 451ImmutableDictionary<string, string>.Builder parameterToNewFieldMap, 452ImmutableDictionary<string, string>.Builder parameterToNewPropertyMap, 644var newMemberMap = 647ImmutableDictionary<string, string>.Empty;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
58var properties = diagnostic.Properties;
src\Analyzers\Core\CodeFixes\RemoveRedundantEquality\RemoveRedundantEqualityCodeFixProvider.cs (1)
35ImmutableDictionary<string, string?> properties,
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
64ImmutableDictionary<string, string?> properties,
src\Analyzers\Core\CodeFixes\UseCompoundAssignment\AbstractUseCompoundAssignmentCodeFixProvider.cs (2)
30private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _binaryToAssignmentMap; 31private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _assignmentToTokenMap;
src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
63ImmutableDictionary<string, string?> properties,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
43ImmutableDictionary<string, string?> properties,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
264ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewFieldMap, bool isContainedInUnsafeType) 286ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewPropertyMap, bool isContainedInUnsafeType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
464ImmutableDictionary<string, ISymbol>? parameterToExistingMemberMap, 465ImmutableDictionary<string, string>? parameterToNewMemberMap,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
20private static readonly ImmutableDictionary<BinaryOperatorKind, BinaryOperatorKind> s_negatedBinaryMap =
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (2)
26private ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 27= ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (6)
28private ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 29= ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)>.Empty; 35private ImmutableDictionary<string, MefLanguageServices> _languageServicesMap 36= ImmutableDictionary<string, MefLanguageServices>.Empty; 75var allLanguageServices = Interlocked.Exchange(ref _languageServicesMap, _languageServicesMap.Clear()); 178var currentServicesMap = _languageServicesMap;
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (3)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpVerifierHelper.cs (3)
22internal static ImmutableDictionary<string, ReportDiagnostic> NullableWarnings { get; } = GetNullableWarningsFromCompiler(); 24private static ImmutableDictionary<string, ReportDiagnostic> GetNullableWarningsFromCompiler() 28var nullableWarnings = commandLineArguments.CompilationOptions.SpecificDiagnosticOptions;
Microsoft.CodeAnalysis.Collections.Package (11)
ImmutableSegmentedDictionary`2.cs (3)
18/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 22/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 32/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
Microsoft.CodeAnalysis.CSharp (197)
Binder\Binder_Lookup.cs (3)
373protected bool IsUsingAlias(ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, string name, bool callerIsSemanticModel) 398ImmutableDictionary<string, AliasAndUsingDirective> usingAliases, 1917ImmutableDictionary<string, AliasAndUsingDirective> usingAliases,
Binder\DecisionDagBuilder.cs (16)
828DagState uniquifyState(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 887ImmutableDictionary<BoundDagTemp, IValueSet>.Empty); 950out var whenTrueDecisions, out var whenTrueValues, 951out var whenFalseDecisions, out var whenFalseValues, 1088out ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1090out ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1125ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1126ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1130ImmutableDictionary<BoundDagTemp, IValueSet> values, 1149ImmutableDictionary<BoundDagTemp, IValueSet> whenTrueValues, 1150ImmutableDictionary<BoundDagTemp, IValueSet> whenFalseValues, 1169var whenTrueValues = values.SetItem(input, fromTestPassing); 1170var whenFalseValues = values.SetItem(input, fromTestFailing); 1854public ImmutableDictionary<BoundDagTemp, IValueSet> RemainingValues { get; private set; } = null!; 1883public static DagState GetInstance(FrozenArrayBuilder<StateForCase> cases, ImmutableDictionary<BoundDagTemp, IValueSet> remainingValues) 1927internal void UpdateRemainingValues(ImmutableDictionary<BoundDagTemp, IValueSet> newRemainingValues)
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)
352return Imports.Create(ImmutableDictionary<string, AliasAndUsingDirective>.Empty, _usings, ImmutableArray<AliasAndExternAliasDirective>.Empty);
BoundTree\UnboundLambda.cs (5)
505private ImmutableDictionary<(NamedTypeSymbol Type, bool IsExpressionLambda), BoundLambda>? _bindingCache; 510private ImmutableDictionary<ReturnInferenceCacheKey, BoundLambda>? _returnInferenceCache; 521_bindingCache = ImmutableDictionary<(NamedTypeSymbol Type, bool IsExpressionLambda), BoundLambda>.Empty.WithComparers(BindingCacheComparer.Instance); 522_returnInferenceCache = ImmutableDictionary<ReturnInferenceCacheKey, BoundLambda>.Empty; 1239private static BoundLambda? GuessBestBoundLambda<T>(ImmutableDictionary<T, BoundLambda> candidates)
CommandLine\CSharpCommandLineParser.cs (1)
1465var 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)
944var loadedSyntaxTreeMap = syntaxAndDeclarations.GetLazyState().LoadedSyntaxTreeMap; 1012var 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)
36private ImmutableDictionary<Symbol, Symbol> _lazyRemappedSymbols; 37private readonly ImmutableDictionary<Symbol, Symbol> _parentRemappedSymbolsOpt; 50ImmutableDictionary<Symbol, Symbol> parentRemappedSymbolsOpt) 162internal ImmutableDictionary<Symbol, Symbol> GetRemappedSymbols() 205ImmutableDictionary<Symbol, Symbol> ignored = null; 1473protected void UnguardedAddBoundTreeForStandaloneSyntax(SyntaxNode syntax, BoundNode bound, NullableWalker.SnapshotManager manager = null, ImmutableDictionary<Symbol, Symbol> remappedSymbols = null) 1481protected void GuardedAddBoundTreeForStandaloneSyntax(SyntaxNode syntax, BoundNode bound, NullableWalker.SnapshotManager manager = null, ImmutableDictionary<Symbol, Symbol> remappedSymbols = null) 1960var remappedSymbols = _parentRemappedSymbolsOpt; 2045ref 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)
1799ImmutableDictionary<Symbol, Symbol>? remappedSymbols = null;
CSharpCompilationOptions.cs (3)
445protected override CompilationOptions CommonWithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>? specificDiagnosticOptions) => 464public new CSharpCompilationOptions WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>? values) 468values = ImmutableDictionary<string, ReportDiagnostic>.Empty;
CSharpParseOptions.cs (5)
24private ImmutableDictionary<string, string> _features; 59ImmutableDictionary<string, string>.Empty) 74_features = features?.ToImmutableDictionary() ?? ImmutableDictionary<string, string>.Empty; 165ImmutableDictionary<string, string> dictionary = 167?? ImmutableDictionary<string, string>.Empty;
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
101ImmutableDictionary<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)
216private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)>.Builder? _analyzedNullabilityMapOpt; 460ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>.Builder? analyzedNullabilityMapOpt, 1495ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1497ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> analyzedNullabilitiesMap; 1502private static (SnapshotManager?, ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)>) AnalyzeWithSemanticInfo( 1538var analyzedNullabilitiesMap = analyzedNullabilities.ToImmutable(); 1567ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1598var analyzedNullabilitiesMap = analyzedNullabilities.ToImmutable(); 1608private static BoundNode Rewrite(ImmutableDictionary<BoundExpression, (NullabilityInfo, TypeSymbol?)> updatedNullabilities, SnapshotManager? snapshotManager, BoundNode node, ref ImmutableDictionary<Symbol, Symbol>? remappedSymbols) 1730ImmutableDictionary<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)
12218private readonly ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> _updatedNullabilities; 12220private readonly ImmutableDictionary<Symbol, Symbol>.Builder _remappedSymbols; 12222public NullabilityRewriter(ImmutableDictionary<BoundExpression, (NullabilityInfo Info, TypeSymbol? Type)> updatedNullabilities, NullableWalker.SnapshotManager? snapshotManager, ImmutableDictionary<Symbol, Symbol>.Builder remappedSymbols)
Lowering\LocalRewriter\LocalRewriter_BasePatternSwitchLocalRewriter.cs (1)
68protected (ImmutableArray<BoundStatement> loweredDag, ImmutableDictionary<SyntaxNode, ImmutableArray<BoundStatement>> switchSections) LowerDecisionDag(BoundDecisionDag decisionDag)
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (1)
115(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)
33ImmutableDictionary<MetadataReference, ImmutableArray<MetadataReference>> mergedAssemblyReferencesMap = GetBoundReferenceManager().MergedAssemblyReferencesMap;
Symbols\ReferenceManager.cs (2)
247public PEAssemblySymbol CreatePEAssemblyForAssemblyMetadata(AssemblyMetadata metadata, MetadataImportOptions importOptions, out ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> assemblyReferenceIdentityMap) 380ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?>.Empty;
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; 1104public ImmutableDictionary<string, AliasAndUsingDirective>? UsingAliasesMap { get; init; } 1122UsingAliasesMap = ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 1128public ImmutableDictionary<string, AliasAndUsingDirective>? UsingAliasesMap { get; init; } 1139Imports.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)
85internal ImmutableDictionary<MethodSymbol, MethodSymbol>? synthesizedMethodImplMap; 2324ImmutableDictionary<MethodSymbol, MethodSymbol> makeSynthesizedMethodImplMap()
Syntax\CSharpPragmaWarningStateMap.cs (1)
86var accumulatedSpecificWarningState = ImmutableDictionary.Create<string, PragmaWarningState>();
Syntax\CSharpSyntaxTree.cs (6)
336ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 456ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 494ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 914ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 926ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 938ImmutableDictionary<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)
2787ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 2800ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 2814ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions, 2828ImmutableDictionary<string, ReportDiagnostic>? diagnosticOptions,
Microsoft.CodeAnalysis.CSharp.CodeStyle (35)
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
63ImmutableDictionary<string, string?>.Empty);
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
66ImmutableDictionary<string, string?>.Empty);
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToProgramMainDiagnosticAnalyzer.cs (1)
62ImmutableDictionary<string, string?>.Empty));
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
82ImmutableDictionary<string, string?>.Empty));
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
75properties: ImmutableDictionary<string, string?>.Empty
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (2)
175var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (2)
22private static readonly ImmutableDictionary<string, string?> s_subsequentSectionProperties = ImmutableDictionary<string, string?>.Empty.Add(IsSubsequentSection, "");
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (2)
21public static readonly ImmutableDictionary<string, string?> ChangesSemantics = 22ImmutableDictionary<string, string?>.Empty.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (1)
50var properties = GetDiagnosticProperties(unwrapArgument, useSpread, changesSemantics);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
75var properties = GetDiagnosticProperties(unwrapArgument, useSpread, changesSemantics);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
1208public static ImmutableDictionary<string, string?> GetDiagnosticProperties(bool unwrapArgument, bool useSpread, bool changesSemantics) 1210var properties = ImmutableDictionary<string, string?>.Empty;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (4)
105var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(UseExpressionBody), ""); 119var properties = ImmutableDictionary<string, string?>.Empty;
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (4)
79var properties = ImmutableDictionary<string, string?>.Empty; 92var properties = ImmutableDictionary<string, string?>.Empty;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
212ImmutableDictionary<string, string?>.Empty));
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
267ImmutableDictionary<string, string?>.Empty,
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\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
112ImmutableDictionary<string, string?>.Empty.Add(NameKey, stringValue)));
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (2)
28private static readonly ImmutableDictionary<string, string?> s_safeProperties = ImmutableDictionary<string, string?>.Empty.Add(SafeKey, "");
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
144var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(ArrayCreationOperationLocation), operationLocation.ToString());
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (28)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
69var properties = diagnostic.Properties;
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\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
39ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
41ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForCreateCodeFixProvider.cs (1)
40ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyCodeFixProvider.cs (1)
38ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
48ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForNewCodeFixProvider.cs (1)
39ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (1)
35ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (7)
59var properties = diagnostic.Properties; 91ImmutableDictionary<string, string?> properties, 107ImmutableDictionary<string, string?> properties, 122var removedMembers = await RemoveMembersAsync().ConfigureAwait(false); 469async ValueTask<ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)>> RemoveMembersAsync() 471var removedMembers = ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)>.Empty;
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,
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
InlineRename\CSharpEditorInlineRenameService.cs (1)
36public override async Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (10)
Completion\CompletionServiceTests.cs (1)
114var options = new TestOptionSet(ImmutableDictionary<OptionKey, object>.Empty.Add(new OptionKey(ThirdPartyOption.Instance, LanguageNames.CSharp), 1));
Rename\CSharpInlineRenameServiceTests.cs (8)
28private class ContextDictionaryComparer : IEqualityComparer<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>?> 32public bool Equals(ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>? x, ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>? y) 55public int GetHashCode(ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>? obj) 56=> EqualityComparer<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>?>.Default.GetHashCode(obj); 74var expectedContext = JsonSerializer.Deserialize<ImmutableDictionary<string, ImmutableArray<(string, string)>>>(expectedContextJson, serializationOptions); 75AssertEx.AreEqual<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>?>(expectedContext, context, comparer: ContextDictionaryComparer.Instance);
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (1)
70expectedCode, out var massaged, out int? caretPosition, out ImmutableDictionary<string, ImmutableArray<TextSpan>> spans);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
37var pdbOptions = DeterministicBuildCompilationTestHelpers.ParseCompilationOptions(compilationOptionsBlobReader);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (24)
Attributes\AttributeTests_WellKnownAttributes.cs (6)
8807verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Warn)), 8813verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Error)), 8819verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Hidden)), 8825verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Suppress))); 8828verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS0618", ReportDiagnostic.Error)), 8834verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS0618", ReportDiagnostic.Suppress)),
Diagnostics\DiagnosticAnalyzerTests.cs (10)
1508var analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "true")); 1516analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "TRUE")); 1522analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "false")); 1528analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("generated_code", "auto")); 3710var diagnosticsMap = syntax ? analysisResult.SyntaxDiagnostics : analysisResult.SemanticDiagnostics; 3711var diagnostics = diagnosticsMap.TryGetValue(tree1, out var value) ? value : ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>.Empty; 4023if (analysisResult.AdditionalFileDiagnostics.TryGetValue(additionalFile, out var diagnosticsMap) && 4195.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add(AnalyzerWithDisabledRules.Rule.Id, ReportDiagnostic.Warn))
Diagnostics\DiagnosticSuppressorTests.cs (3)
313var specificDiagnosticOptions = compilation.Options.SpecificDiagnosticOptions.Add(suppressionId, ReportDiagnostic.Suppress); 328var originalSpecificDiagnosticOptions = compilation.Options.SpecificDiagnosticOptions; 359var specificDiagnosticOptions = originalSpecificDiagnosticOptions.Add(
Diagnostics\GetDiagnosticsTests.cs (5)
558var analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("dotnet_analyzer_diagnostic.severity", "none")); 560ImmutableDictionary<object, AnalyzerConfigOptions>.Empty.Add(compilation.SyntaxTrees.Single(), analyzerConfigOptions), 604var analyzerConfigOptions = new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add(options.Value.key, options.Value.value)); 606ImmutableDictionary<object, AnalyzerConfigOptions>.Empty.Add(compilation.SyntaxTrees.Single(), analyzerConfigOptions), 1083var diagnosticsByAnalyzerMap = result.SemanticDiagnostics[syntaxTree];
Microsoft.CodeAnalysis.CSharp.Features (69)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (2)
104var parameterToSynthesizedFields = CreateSynthesizedFields(); 176ImmutableDictionary<IParameterSymbol, IFieldSymbol> CreateSynthesizedFields()
ExtractInterface\CSharpExtractInterfaceService.cs (1)
69IEnumerable<ISymbol> includedMembers, ImmutableDictionary<ISymbol, SyntaxAnnotation> symbolToDeclarationMap,
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
63ImmutableDictionary<string, string?>.Empty);
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
66ImmutableDictionary<string, string?>.Empty);
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToProgramMainDiagnosticAnalyzer.cs (1)
62ImmutableDictionary<string, string?>.Empty));
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
82ImmutableDictionary<string, string?>.Empty));
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
75properties: ImmutableDictionary<string, string?>.Empty
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (2)
175var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (2)
22private static readonly ImmutableDictionary<string, string?> s_subsequentSectionProperties = ImmutableDictionary<string, string?>.Empty.Add(IsSubsequentSection, "");
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (2)
21public static readonly ImmutableDictionary<string, string?> ChangesSemantics = 22ImmutableDictionary<string, string?>.Empty.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (1)
50var properties = GetDiagnosticProperties(unwrapArgument, useSpread, changesSemantics);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
75var properties = GetDiagnosticProperties(unwrapArgument, useSpread, changesSemantics);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
1208public static ImmutableDictionary<string, string?> GetDiagnosticProperties(bool unwrapArgument, bool useSpread, bool changesSemantics) 1210var properties = ImmutableDictionary<string, string?>.Empty;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (4)
105var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(UseExpressionBody), ""); 119var properties = ImmutableDictionary<string, string?>.Empty;
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (4)
79var properties = ImmutableDictionary<string, string?>.Empty; 92var properties = ImmutableDictionary<string, string?>.Empty;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
212ImmutableDictionary<string, string?>.Empty));
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
267ImmutableDictionary<string, string?>.Empty,
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\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
112ImmutableDictionary<string, string?>.Empty.Add(NameKey, stringValue)));
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (2)
28private static readonly ImmutableDictionary<string, string?> s_safeProperties = ImmutableDictionary<string, string?>.Empty.Add(SafeKey, "");
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
144var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(ArrayCreationOperationLocation), operationLocation.ToString());
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
69var properties = diagnostic.Properties;
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\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
39ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
41ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForCreateCodeFixProvider.cs (1)
40ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyCodeFixProvider.cs (1)
38ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
48ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForNewCodeFixProvider.cs (1)
39ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (1)
35ImmutableDictionary<string, string?> properties,
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (7)
59var properties = diagnostic.Properties; 91ImmutableDictionary<string, string?> properties, 107ImmutableDictionary<string, string?> properties, 122var removedMembers = await RemoveMembersAsync().ConfigureAwait(false); 469async ValueTask<ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)>> RemoveMembersAsync() 471var removedMembers = ImmutableDictionary<ISymbol, (MemberDeclarationSyntax memberNode, SyntaxNode nodeToRemove)>.Empty;
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,
Structure\CSharpBlockStructureProvider.cs (2)
16private static ImmutableDictionary<Type, ImmutableArray<AbstractSyntaxStructureProvider>> CreateDefaultNodeProviderMap() 60private static ImmutableDictionary<int, ImmutableArray<AbstractSyntaxStructureProvider>> CreateDefaultTriviaProviderMap()
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
105ImmutableDictionary<string, string?>.Empty));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1063ImmutableDictionary<string, ReportDiagnostic>.Empty
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\ImportsTests.cs (2)
124ImmutableDictionary<string, AliasAndUsingDirective>.Empty, 129ImmutableDictionary<string, AliasAndUsingDirective>.Empty,
Semantics\InitOnlyMemberTests.cs (2)
3469ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS1685", ReportDiagnostic.Suppress))); 3568ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS1685", ReportDiagnostic.Suppress)));
SourceGeneration\GeneratorDriverTests.cs (4)
855var options = new CompilerAnalyzerConfigOptionsProvider(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty.Add("a", "abc").Add("b", "def"))); 2628var builder = ImmutableDictionary<string, string>.Empty.ToBuilder(); 2630var optionsProvider = new CompilerAnalyzerConfigOptionsProvider(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, new DictionaryAnalyzerConfigOptions(builder.ToImmutable()));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DeclarationTests.cs (1)
994public override ImmutableDictionary<string, ReportDiagnostic> DiagnosticOptions => throw new NotImplementedException();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Syntax\SyntaxTreeTests.cs (8)
130var options = CreateImmutableDictionary(("CS0078", ReportDiagnostic.Suppress)); 140var options = CreateImmutableDictionary(("CS0078", ReportDiagnostic.Suppress)); 166Assert.NotSame(ImmutableDictionary<string, ReportDiagnostic>.Empty, tree.DiagnosticOptions); 176diagnosticOptions: ImmutableDictionary<string, ReportDiagnostic>.Empty, 181Assert.Same(ImmutableDictionary<string, ReportDiagnostic>.Empty, tree.DiagnosticOptions); 187var options = CreateImmutableDictionary(("CS0078", ReportDiagnostic.Suppress)); 220var newTree = tree.WithDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty); 231var map = ImmutableDictionary.CreateRange(
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
CSharpTestBase.cs (1)
2380internal static ImmutableDictionary<string, ReportDiagnostic> ReportStructInitializationWarnings { get; } = ImmutableDictionary.CreateRange(
TestOptions.cs (2)
174return options.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add(key, value)); 179return options.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add(key1, value).Add(key2, value));
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
LanguageServices\FixAllSpanMappingService\CSharpFixAllSpanMappingService.cs (4)
28protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 34return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty; 47return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty; 52return ImmutableDictionary<Document, ImmutableArray<TextSpan>>.Empty
Rename\CSharpRenameRewriterLanguageService.cs (2)
56private readonly ImmutableDictionary<TextSpan, RenameLocation> _renameLocations; 93private readonly ImmutableDictionary<TextSpan, ImmutableSortedSet<TextSpan>?> _stringAndCommentTextSpans;
Microsoft.CodeAnalysis.EditorFeatures (32)
CodeLens\ICodeLensContext.cs (1)
20Task<ImmutableDictionary<Guid, string>> GetProjectVersionsAsync(ImmutableArray<Guid> projectGuids, CancellationToken cancellationToken);
EditAndContinue\PdbMatchingSourceTextProvider.cs (1)
164public ImmutableDictionary<string, (DocumentState state, int solutionVersion)> GetDocumentsWithChangedLoaderByPath()
EditorConfigSettings\Aggregator\SettingsAggregator.cs (1)
115var projectCountByLanguage = solution.ProjectCountByLanguage;
ExternalAccess\IntelliCode\Api\IIntentSourceProvider.cs (2)
62internal readonly struct IntentSource(string title, string actionName, ImmutableDictionary<DocumentId, ImmutableArray<TextChange>> documentChanges) 72public readonly ImmutableDictionary<DocumentId, ImmutableArray<TextChange>> DocumentChanges = documentChanges;
ExternalAccess\IntelliCode\IntentProcessor.cs (2)
28private readonly ImmutableDictionary<(string LanguageName, string IntentName), Lazy<IIntentProvider, IIntentProviderMetadata>> _lazyIntentProviders = CreateProviderMap(lazyIntentProviders); 30private static ImmutableDictionary<(string LanguageName, string IntentName), Lazy<IIntentProvider, IIntentProviderMetadata>> CreateProviderMap(
ExternalAccess\VSTypeScript\VSTypeScriptEditorInlineRenameService.cs (2)
40public Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(IInlineRenameInfo inlineRenameInfo, IInlineRenameLocationSet inlineRenameLocationSet, CancellationToken cancellationToken) 42return Task.FromResult(ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>.Empty);
InlineRename\AbstractEditorInlineRenameService.cs (2)
35public virtual Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(IInlineRenameInfo inlineRenameInfo, IInlineRenameLocationSet inlineRenameLocationSet, CancellationToken cancellationToken) 37return Task.FromResult(ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>.Empty);
InlineRename\AbstractEditorInlineRenameService.InlineRenameReplacementInfo.cs (1)
40var modifiedSpans = _conflicts.GetModifiedSpanMap(documentId);
InlineRename\IEditorInlineRenameService.cs (1)
275Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(
IntelliSense\AsyncCompletion\FilterSet.cs (1)
33private static readonly ImmutableDictionary<string, FilterWithMask> s_filterMap;
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (2)
93private ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> _cachedTagTrees_mayChangeFromAnyThread = ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>>.Empty;
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (14)
56var oldTagTrees = Interlocked.Exchange( 57ref _cachedTagTrees_mayChangeFromAnyThread, ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>>.Empty); 240private async Task<(ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> oldTagTrees, ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> newTagTrees, TResult)> 242Func<ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>>, TArgs, CancellationToken, ValueTask<(ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> newTagTrees, TResult result)>> callback, 248var oldTagTrees = _cachedTagTrees_mayChangeFromAnyThread; 281private async Task<ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>>?> RecomputeTagsAsync( 468private ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> ComputeNewTagTrees( 469ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> oldTagTrees, 513ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> oldTagTrees, 598ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> oldTagTrees, 599ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> newTagTrees) 734var tagTrees = _cachedTagTrees_mayChangeFromAnyThread;
Tagging\TaggerContext.cs (2)
20private readonly ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> _existingTags; 74ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> existingTags)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
Classification\FormattedClassification.cs (2)
16private static readonly ImmutableDictionary<string, string> s_classificationPrefixToTestHelperMap = ImmutableDictionary<string, string>.Empty
CompleteStatement\AbstractCompleteStatementTests.cs (1)
40TestFileMarkupParser.GetPositionsAndSpans(initialMarkup, out var output, out var positions, out var spans);
Squiggles\TestDiagnosticTagProducer.cs (1)
43properties: ImmutableDictionary<string, string?>.Empty,
StubSettingsManagerHost.cs (2)
88private ImmutableDictionary<string, VersionedString> _values = ImmutableDictionary<string, VersionedString>.Empty;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (10)
CodeFixes\ExtensionOrderingTests.cs (1)
133var codeFixPriorityMap = codeFixService.GetTestAccessor().GetFixerPriorityPerLanguageMap(services: null!)[language].Value;
Collections\Immutable\Maps\MapTests.cs (4)
21var map = ImmutableDictionary.Create<string, int>().Add("1", 1); 38var map = ImmutableDictionary.Create<string, int>() 53var map = ImmutableDictionary.Create<string, int>() 85var map = ImmutableDictionary.Create<string, int>(new PathologicalComparer<string>())
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
341var newSpecificOptions = project.CompilationOptions.SpecificDiagnosticOptions.Add(NamedTypeAnalyzer.DiagnosticId, ReportDiagnostic.Warn);
Diagnostics\DiagnosticDataTests.cs (4)
124properties: ImmutableDictionary<string, string>.Empty, 157properties: ImmutableDictionary<string, string>.Empty, 203properties: ImmutableDictionary<string, string>.Empty, 251properties: ImmutableDictionary<string, string>.Empty,
Microsoft.CodeAnalysis.EditorFeatures.Wpf (5)
InlineRename\UI\SmartRename\SmartRenameViewModel.cs (2)
180var smartRenameContext = ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>.Empty;
Lightup\ISmartRenameSessionWrapper.cs (1)
126public Task<IReadOnlyList<string>> GetSuggestionsAsync(ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>> context, CancellationToken cancellationToken)
Suggestions\FixAll\FixMultipleOccurrencesService.cs (2)
34ImmutableDictionary<Document, ImmutableArray<Diagnostic>> diagnosticsToFix, 52ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsToFix,
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticProviderTests.vb (1)
355properties:=ImmutableDictionary(Of String, String).Empty,
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (28)
MetadataContext.cs (2)
14internal readonly ImmutableDictionary<MetadataContextId, TAssemblyContext> AssemblyContexts; 16internal MetadataContext(ImmutableArray<MetadataBlock> metadataBlocks, ImmutableDictionary<MetadataContextId, TAssemblyContext> assemblyContexts)
PDB\MethodDebugInfo.cs (4)
39public readonly ImmutableDictionary<int, ImmutableArray<bool>>? DynamicLocalMap; // C# only. 40public readonly ImmutableDictionary<int, ImmutableArray<string?>>? TupleLocalMap; 52ImmutableDictionary<int, ImmutableArray<bool>>? dynamicLocalMap, 53ImmutableDictionary<int, ImmutableArray<string?>>? tupleLocalMap,
PDB\MethodDebugInfo.Native.cs (16)
135ImmutableDictionary<int, ImmutableArray<bool>>? dynamicLocalMap = null; 136ImmutableDictionary<string, ImmutableArray<bool>>? dynamicLocalConstantMap = null; 137ImmutableDictionary<int, ImmutableArray<string?>>? tupleLocalMap = null; 138ImmutableDictionary<LocalNameAndScope, ImmutableArray<string?>>? tupleLocalConstantMap = null; 384out ImmutableDictionary<int, ImmutableArray<bool>>? dynamicLocalMap, 385out ImmutableDictionary<string, ImmutableArray<bool>>? dynamicLocalConstantMap) 399ImmutableDictionary<int, ImmutableArray<bool>>.Builder? localBuilder = null; 400ImmutableDictionary<string, ImmutableArray<bool>>.Builder? constantBuilder = null; 472out ImmutableDictionary<int, ImmutableArray<string?>>? tupleLocalMap, 473out ImmutableDictionary<LocalNameAndScope, ImmutableArray<string?>>? tupleLocalConstantMap) 484ImmutableDictionary<int, ImmutableArray<string?>>.Builder? localBuilder = null; 485ImmutableDictionary<LocalNameAndScope, ImmutableArray<string?>>.Builder? constantBuilder = null; 634ImmutableDictionary<string, ImmutableArray<bool>>? dynamicLocalConstantMap, 635ImmutableDictionary<LocalNameAndScope, ImmutableArray<string?>>? tupleLocalConstantMap) 696ImmutableDictionary<int, ImmutableArray<bool>>? dynamicLocalMap, 697ImmutableDictionary<int, ImmutableArray<string?>>? tupleLocalConstantMap)
PDB\MethodDebugInfo.Portable.cs (6)
26ImmutableDictionary<int, ImmutableArray<bool>>? dynamicLocalMap; 27ImmutableDictionary<int, ImmutableArray<string?>>? tupleLocalMap; 131out ImmutableDictionary<int, ImmutableArray<bool>>? dynamicLocalMap, 132out ImmutableDictionary<int, ImmutableArray<string?>>? tupleLocalMap, 139ImmutableDictionary<int, ImmutableArray<bool>>.Builder? lazyDynamicLocalsBuilder = null; 140ImmutableDictionary<int, ImmutableArray<string?>>.Builder? lazyTupleLocalsBuilder = null;
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (4)
SpecialTypeExtensions.cs (2)
20private static readonly ImmutableDictionary<SpecialType, QualifiedTypeSignature> s_typeSignatures = GetTypeSignatures(); 22private static ImmutableDictionary<SpecialType, QualifiedTypeSignature> GetTypeSignatures()
VisualBasic\MemberSignatureParser.cs (1)
18internal static readonly ImmutableDictionary<string, SyntaxKind> KeywordKinds = GetKeywordKinds(StringComparer);
VisualBasic\SyntaxKind.cs (1)
40private static ImmutableDictionary<string, SyntaxKind> GetKeywordKinds(StringComparer comparer)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (6)
Completion\FSharpCommonCompletionItem.cs (1)
24ImmutableDictionary<string, string> properties = null,
FSharpDocumentSpan.cs (2)
25public ImmutableDictionary<string, object> Properties { get; } = ImmutableDictionary<string, object>.Empty;
Internal\Editor\FSharpEditorInlineRenameService.cs (2)
206public Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(IInlineRenameInfo inlineRenameInfo, IInlineRenameLocationSet inlineRenameLocationSet, CancellationToken cancellationToken) 208return Task.FromResult(ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>.Empty);
VS\IFSharpWorkspaceProjectContextFactory.cs (1)
102private ImmutableDictionary<string, IFSharpWorkspaceProjectContext> _projectReferences;
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Formatting\OmniSharpSyntaxFormattingOptionsWrapper.cs (1)
30StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Remote\RazorRemoteServiceCallbackDispatcherRegistry.cs (1)
16private readonly ImmutableDictionary<Type, RazorRemoteServiceCallbackDispatcher> _lazyDispatchers;
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (4)
RazorPredefinedProviderNameTests.cs (4)
23var roslynProviderNames = GetPredefinedNamesFromFields(roslynProviderNamesType); 24var razorProviderNames = GetPredefinedNamesFromProperties(razorProviderNamesType); 49private static ImmutableDictionary<string, string> GetPredefinedNamesFromFields(Type namesType) 56private static ImmutableDictionary<string, string> GetPredefinedNamesFromProperties(Type namesType)
Microsoft.CodeAnalysis.Features (252)
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (1)
69var properties = diagnostic.Properties;
CodeFixes\FixAllOccurrences\IFixMultipleOccurrencesService.cs (2)
22ImmutableDictionary<Document, ImmutableArray<Diagnostic>> diagnosticsToFix, 37ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsToFix,
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (3)
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 (7)
32private readonly Lazy<ImmutableDictionary<string, Lazy<ImmutableArray<CodeRefactoringProvider>>>> _lazyLanguageToProvidersMap = new Lazy<ImmutableDictionary<string, Lazy<ImmutableArray<CodeRefactoringProvider>>>>( 40private readonly Lazy<ImmutableDictionary<CodeRefactoringProvider, CodeChangeProviderMetadata>> _lazyRefactoringToMetadataMap = new(() => providers.Where(provider => provider.IsValueCreated).ToImmutableDictionary(provider => provider.Value, provider => provider.Metadata)); 42private ImmutableDictionary<CodeRefactoringProvider, FixAllProviderInfo?> _fixAllProviderMap = ImmutableDictionary<CodeRefactoringProvider, FixAllProviderInfo?>.Empty; 57private ImmutableDictionary<string, Lazy<ImmutableArray<CodeRefactoringProvider>>> LanguageToProvidersMap 60private ImmutableDictionary<CodeRefactoringProvider, CodeChangeProviderMetadata> RefactoringToMetadataMap
Common\AbstractProjectExtensionProvider.cs (2)
30private ImmutableDictionary<string, ImmutableArray<TExtension>> _extensionsPerLanguage = ImmutableDictionary<string, ImmutableArray<TExtension>>.Empty;
Completion\CompletionChange.cs (4)
43internal ImmutableDictionary<string, string> Properties { get; } 47: this(textChange, textChanges, newPosition, includesCommitCharacter, ImmutableDictionary<string, string>.Empty) 52TextChange textChange, ImmutableArray<TextChange> textChanges, int? newPosition, bool includesCommitCharacter, ImmutableDictionary<string, string> properties) 112ImmutableDictionary<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, 322ImmutableDictionary<string, string>? properties, 448public CompletionItem WithProperties(ImmutableDictionary<string, string> properties)
Completion\CompletionService.ProviderManager.cs (3)
28private readonly Lazy<ImmutableDictionary<string, CompletionProvider>> _nameToProvider; 39_nameToProvider = new Lazy<ImmutableDictionary<string, CompletionProvider>>(LoadImportedProvidersAndCreateNameMap, LazyThreadSafetyMode.PublicationOnly); 49private ImmutableDictionary<string, CompletionProvider> LoadImportedProvidersAndCreateNameMap()
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (2)
60var props = ImmutableDictionary<string, string>.Empty
Completion\Providers\SymbolCompletionItem.cs (1)
280ImmutableDictionary<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,
Diagnostics\DiagnosticAnalyzerTelemetry.cs (4)
45private ImmutableDictionary<Type, Data> _analyzerInfoMap; 48=> _analyzerInfoMap = ImmutableDictionary<Type, Data>.Empty; 60ImmutableDictionary<Type, Data> map; 64_analyzerInfoMap = ImmutableDictionary<Type, Data>.Empty;
EditAndContinue\ActiveStatementsMap.cs (6)
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) 127private static bool TryGetUpToDateSpan(ManagedActiveStatementDebugInfo activeStatementInfo, ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> remapping, out LinePositionSpan newSpan)
EditAndContinue\DebuggingSession.cs (4)
127nonRemappableRegions: ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>.Empty, 214internal void RestartEditSession(ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>? nonRemappableRegions, bool? inBreakState) 430private static ImmutableDictionary<K, ImmutableArray<V>> GroupToImmutableDictionary<K, V>(IEnumerable<IGrouping<K, V>> items) 577ImmutableDictionary<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\EditSession.cs (3)
63internal readonly ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> NonRemappableRegions; 90ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> nonRemappableRegions, 1181ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> previousNonRemappableRegions,
EmbeddedLanguages\AbstractEmbeddedLanguageFeatureService.cs (1)
39private readonly ImmutableDictionary<string, ImmutableArray<Lazy<TService, EmbeddedLanguageMetadata>>> _identifierToServices;
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionAnalyzer.cs (4)
25private static readonly ImmutableDictionary<string, string?> s_strictProperties = 26ImmutableDictionary<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)
82private readonly ImmutableDictionary<string, TextSpan> _captureNamesToSpan; 83private readonly ImmutableDictionary<int, TextSpan> _captureNumbersToSpan; 92ImmutableDictionary<string, TextSpan> captureNamesToSpan, 93ImmutableDictionary<int, TextSpan> captureNumbersToSpan) : this() 145ImmutableDictionary<string, TextSpan>.Empty, 146ImmutableDictionary<int, TextSpan>.Empty).ParseTree();
EmbeddedLanguages\RegularExpressions\RegexTree.cs (4)
18ImmutableDictionary<string, TextSpan> captureNamesToSpan, 19ImmutableDictionary<int, TextSpan> captureNumbersToSpan) : EmbeddedSyntaxTree<RegexKind, RegexNode, RegexCompilationUnit>(text, root, diagnostics) 21public readonly ImmutableDictionary<string, TextSpan> CaptureNamesToSpan = captureNamesToSpan; 22public readonly ImmutableDictionary<int, TextSpan> CaptureNumbersToSpan = captureNumbersToSpan;
ExternalAccess\Pythia\Api\PythiaCompletionProviderBase.cs (2)
29ImmutableDictionary<string, string>? properties = null, 43ImmutableDictionary<string, string>? properties = null,
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)
44ImmutableDictionary<ISymbol, SyntaxAnnotation> symbolToDeclarationAnnotationMap, 320ImmutableDictionary<ISymbol, SyntaxAnnotation> symbolToDeclarationAnnotationMap,
FindUsages\DefinitionItem.cs (7)
66public ImmutableDictionary<string, string> Properties { get; } 123ImmutableDictionary<string, string>? properties, 133Properties = properties ?? ImmutableDictionary<string, string>.Empty; 214ImmutableDictionary<string, string>? properties = null, 229ImmutableDictionary<string, string>? properties = null, 259ImmutableDictionary<string, string>? properties = null, 262properties ??= ImmutableDictionary<string, string>.Empty;
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
30ImmutableDictionary<string, string>? properties,
FindUsages\DefinitionItem.DetachedDefinitionItem.cs (2)
25ImmutableDictionary<string, string> properties, 40public readonly ImmutableDictionary<string, string> Properties = properties;
FindUsages\DefinitionItemFactory.cs (6)
120var properties = GetProperties(definition, isPrimary); 147internal static ImmutableDictionary<string, string> WithMetadataSymbolProperties(this ImmutableDictionary<string, string> properties, ISymbol symbol, ProjectId originatingProjectId) 254private static ImmutableDictionary<string, string> GetProperties(ISymbol definition, bool isPrimary) 256var properties = ImmutableDictionary<string, string>.Empty;
FindUsages\IRemoteFindUsagesService.cs (2)
191ImmutableDictionary<string, string> properties, 214public readonly ImmutableDictionary<string, string> Properties = properties;
GenerateType\AbstractGenerateTypeService.Editor.cs (2)
585ImmutableDictionary<string, ISymbol>.Builder parameterToFieldMap, 586ImmutableDictionary<string, string>.Builder parameterToNewFieldMap)
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
733properties: ImmutableDictionary<string, string>.Empty.WithMetadataSymbolProperties(symbol, originatingProjectId));
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (7)
251ImmutableDictionary<ISymbol, string> renameTable) 277ImmutableDictionary<ISymbol, string> renameTable, 289ImmutableDictionary<ISymbol, SyntaxNode> replacementTable, 322private ImmutableDictionary<ISymbol, SyntaxNode> ComputeReplacementTable( 325ImmutableDictionary<IParameterSymbol, TExpressionSyntax> parametersToReplace, 327ImmutableDictionary<ISymbol, string> renameTable) 351private static ImmutableDictionary<ISymbol, string> ComputeRenameTable(
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (2)
28ImmutableDictionary<IParameterSymbol, TExpressionSyntax> parametersToReplace, 124public ImmutableDictionary<IParameterSymbol, TExpressionSyntax> ParametersToReplace { get; } = parametersToReplace;
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
214var newNameOriginalSymbolMapping = memberSymbols
MoveToNamespace\MoveToNamespaceResult.cs (2)
19public ImmutableDictionary<string, ISymbol> NewNameOriginalSymbolMapping { get; } 26ImmutableDictionary<string, ISymbol> newNameOriginalSymbolMapping)
PdbSourceDocument\DocumentDebugInfoReader.cs (1)
106public ImmutableDictionary<string, string> GetCompilationOptions()
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (3)
179ImmutableDictionary<string, string> pdbCompilationOptions; 294private ProjectInfo? CreateProjectInfo(Workspace workspace, Project project, ImmutableDictionary<string, string> pdbCompilationOptions, string assemblyName, string assemblyVersion, SourceHashAlgorithm checksumAlgorithm) 472public ImmutableDictionary<string, SourceDocumentInfo> Documents => _instance._fileToDocumentInfoMap.ToImmutableDictionary();
PreferFrameworkType\PreferFrameworkTypeConstants.cs (2)
14public static readonly ImmutableDictionary<string, string> Properties = 15ImmutableDictionary<string, string>.Empty.Add(PreferFrameworkType, "");
PullMemberUp\MembersPuller.cs (3)
100var symbolToDeclarationsMap = await InitializeSymbolToDeclarationsMapAsync(pullMemberUpOptions, cancellationToken).ConfigureAwait(false); 281var symbolToDeclarations = await InitializeSymbolToDeclarationsMapAsync(result, cancellationToken).ConfigureAwait(false); 467private static async Task<ImmutableDictionary<ISymbol, ImmutableArray<SyntaxNode>>> InitializeSymbolToDeclarationsMapAsync(
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (5)
93var definitionToBackingField = CreateDefinitionToBackingFieldMap(propertyReferences); 119private static ImmutableDictionary<IPropertySymbol, IFieldSymbol?> CreateDefinitionToBackingFieldMap(IEnumerable<ReferencedSymbol> propertyReferences) 201ImmutableDictionary<IPropertySymbol, IFieldSymbol?> propertyToBackingField, 221ImmutableDictionary<IPropertySymbol, IFieldSymbol?> propertyToBackingField, 300ImmutableDictionary<IPropertySymbol, IFieldSymbol?> definitionToBackingField,
Shared\Utilities\AnnotatedSymbolMapping.cs (4)
16ImmutableDictionary<ISymbol, SyntaxAnnotation> symbolToDeclarationAnnotationMap, 18ImmutableDictionary<DocumentId, ImmutableArray<ISymbol>> documentIdsToSymbolMap, 25public ImmutableDictionary<ISymbol, SyntaxAnnotation> SymbolToDeclarationAnnotationMap { get; } = symbolToDeclarationAnnotationMap; 35public ImmutableDictionary<DocumentId, ImmutableArray<ISymbol>> DocumentIdsToSymbolMap { get; } = documentIdsToSymbolMap;
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (2)
15protected static readonly ImmutableDictionary<string, string?> ModifiersAddedProperties = ImmutableDictionary<string, string?>.Empty.Add(
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (5)
24private static readonly Dictionary<(bool includeInFixAll, string equivalenceKey), ImmutableDictionary<string, string?>> s_cachedProperties = []; 36var properties = ImmutableDictionary<string, string?>.Empty; 61private static ImmutableDictionary<string, string?> GetProperties(bool includeInFixAll, string equivalenceKey) 144var properties = GetProperties(includeInFixAll, equivalenceKey);
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (2)
26public static readonly ImmutableDictionary<string, string?> s_isFixableProperties = 27ImmutableDictionary<string, string?>.Empty.Add(ForEachCastHelpers.IsFixable, ForEachCastHelpers.IsFixable);
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (14)
36/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 46ImmutableDictionary<string, string?>? properties, 117return CreateWithMessage(descriptor, location, notificationOption, analyzerOptions, additionalLocations, ImmutableDictionary<string, string?>.Empty, message); 119var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty 129ImmutableDictionary<string, string?>.Empty); 163ImmutableDictionary<string, string?>? properties, 185ImmutableDictionary<string, string?>? properties) 190var tagIndices = ImmutableDictionary<string, IEnumerable<int>>.Empty 211ImmutableDictionary<string, string?>? properties) 216properties ??= ImmutableDictionary<string, string?>.Empty; 251/// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>. 261ImmutableDictionary<string, string?>? properties,
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
88properties: ImmutableDictionary<string, string?>.Empty.Add(MatchFolderAndNamespaceConstants.TargetNamespace, targetNamespace),
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
71var properties = ImmutableDictionary<string, string?>.Empty
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (2)
100var properties = ImmutableDictionary<string, string?>.Empty;
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
483static void AddAllDiagnostics(ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> diagnostics, ArrayBuilder<Diagnostic> reportedDiagnostics)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (2)
21private static readonly ImmutableDictionary<string, TargetScope> s_targetScopesMap = CreateTargetScopesMap(); 26private static ImmutableDictionary<string, TargetScope> CreateTargetScopesMap()
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (5)
20using PropertiesMap = ImmutableDictionary<(UnusedValuePreference preference, bool isUnusedLocalAssignment, bool isRemovableAssignment), 21ImmutableDictionary<string, string>>; 94private static readonly PropertiesMap s_propertiesMap = CreatePropertiesMap(); 151private static PropertiesMap CreatePropertiesMap() 154ImmutableDictionary<string, string>>();
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (3)
214var properties = s_propertiesMap[(_options.UnusedValueExpressionStatementPreference, isUnusedLocalAssignment: false, isRemovableAssignment: false)]; 571if (ShouldReportUnusedValueDiagnostic(symbol, unreadWriteOperation, symbolUsageResult, out var properties)) 592out ImmutableDictionary<string, string?>? properties)
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (9)
26private static readonly ImmutableDictionary<string, string?> s_takeCondition 27= ImmutableDictionary<string, string?>.Empty; 28private static readonly ImmutableDictionary<string, string?> s_negateCondition 30private static readonly ImmutableDictionary<string, string?> s_takeConditionOrWhenFalse 32private static readonly ImmutableDictionary<string, string?> s_negateConditionAndWhenFalse 34private static readonly ImmutableDictionary<string, string?> s_negateConditionOrWhenTrue 36private static readonly ImmutableDictionary<string, string?> s_takeConditionAndWhenTrue 38private static readonly ImmutableDictionary<string, string?> s_takeConditionAndWhenFalse 139void ReportDiagnostic(ImmutableDictionary<string, string?> properties)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
653var properties = ImmutableDictionary<string, string?>.Empty;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (3)
185var properties = shouldUseCollectionExpression ? UseCollectionInitializerHelpers.UseCollectionExpressionProperties : ImmutableDictionary<string, string?>.Empty; 246ImmutableDictionary<string, string?>? properties)
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (2)
19public static readonly ImmutableDictionary<string, string?> UseCollectionExpressionProperties = 20ImmutableDictionary<string, string?>.Empty.Add(UseCollectionExpressionName, UseCollectionExpressionName);
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
29private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _binaryToAssignmentMap;
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (2)
21out ImmutableDictionary<TSyntaxKind, TSyntaxKind> binaryToAssignmentMap, 22out ImmutableDictionary<TSyntaxKind, TSyntaxKind> assignmentToTokenMap) where TSyntaxKind : struct
src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (2)
16public static readonly ImmutableDictionary<string, string?> CanSimplifyProperties = 17ImmutableDictionary<string, string?>.Empty.Add(CanSimplifyName, CanSimplifyName);
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (2)
61var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (2)
107var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (4)
52private static readonly ImmutableDictionary<string, string?> s_whenPartIsNullableProperties = 53ImmutableDictionary<string, string?>.Empty.Add(UseNullPropagationConstants.WhenPartIsNullable, ""); 183var properties = whenPartIsNullable 185: ImmutableDictionary<string, string?>.Empty;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (2)
90var properties = whenPartIsNullable 92: ImmutableDictionary<string, string?>.Empty;
src\Analyzers\Core\Analyzers\UseSystemHashCode\UseSystemHashCodeDiagnosticAnalyzer.cs (1)
85ImmutableDictionary<string, string?>.Empty));
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (10)
57private ImmutableDictionary<string, ISymbol>? _parameterToExistingMemberMap; 59public ImmutableDictionary<string, string> ParameterToNewFieldMap { get; private set; } 60public ImmutableDictionary<string, string> ParameterToNewPropertyMap { get; private set; } 71ParameterToNewFieldMap = ImmutableDictionary<string, string>.Empty; 72ParameterToNewPropertyMap = ImmutableDictionary<string, string>.Empty; 450ImmutableDictionary<string, ISymbol>.Builder parameterToExistingMemberMap, 451ImmutableDictionary<string, string>.Builder parameterToNewFieldMap, 452ImmutableDictionary<string, string>.Builder parameterToNewPropertyMap, 644var newMemberMap = 647ImmutableDictionary<string, string>.Empty;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
58var properties = diagnostic.Properties;
src\Analyzers\Core\CodeFixes\RemoveRedundantEquality\RemoveRedundantEqualityCodeFixProvider.cs (1)
35ImmutableDictionary<string, string?> properties,
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
64ImmutableDictionary<string, string?> properties,
src\Analyzers\Core\CodeFixes\UseCompoundAssignment\AbstractUseCompoundAssignmentCodeFixProvider.cs (2)
30private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _binaryToAssignmentMap; 31private readonly ImmutableDictionary<TSyntaxKind, TSyntaxKind> _assignmentToTokenMap;
src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
63ImmutableDictionary<string, string?> properties,
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)
15this 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)
56var targetLibraryKeys = projectAssets.Targets 73ImmutableDictionary<string, ImmutableDictionary<string, string>> targetLibraryKeys, 98ImmutableDictionary<string, ImmutableDictionary<string, string>> targetLibraryKeys,
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\ActiveStatementTestHelpers.cs (1)
107public static IEnumerable<string> InspectNonRemappableRegions(ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> regions)
Snippets\AbstractSnippetProviderTests.cs (1)
66TestFileMarkupParser.GetPositionAndSpans(markupAfterCommit, out markupAfterCommit, out int finalCaretPosition, out ImmutableDictionary<string, ImmutableArray<TextSpan>> placeholderLocations);
Microsoft.CodeAnalysis.Features.UnitTests (14)
EditAndContinue\ActiveStatementsMapTests.cs (6)
141var map = ActiveStatementsMap.Create(debugInfos, remapping: ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>.Empty); 191var map = ActiveStatementsMap.Create(debugInfos, remapping: ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>.Empty); 302var remapping = ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>.Empty.Add( 340var remapping = ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>.Empty.Add(
EditAndContinue\EditSessionActiveStatementsTests.cs (5)
36ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>> nonRemappableRegions = null, 60debuggingSession.RestartEditSession(nonRemappableRegions ?? ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>.Empty, inBreakState: true); 266previousNonRemappableRegions: ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>.Empty, 381previousNonRemappableRegions: ImmutableDictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>.Empty, 500var initialNonRemappableRegions = new Dictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>
EditAndContinue\EmitSolutionUpdateResultsTests.cs (3)
88properties: ImmutableDictionary<string, string?>.Empty, 104properties: ImmutableDictionary<string, string?>.Empty, 121properties: ImmutableDictionary<string, string?>.Empty,
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
Microsoft.CodeAnalysis.LanguageServer (17)
BrokeredServices\BrokeredServiceBridgeProvider.cs (1)
55var serviceBroker = container.GetLimitedAccessServiceBroker(ServiceAudience.Local, ImmutableDictionary<string, string>.Empty, ClientCredentialsPolicy.RequestOverridesDefault);
BrokeredServices\BrokeredServiceContainer.cs (4)
18: base(ImmutableDictionary<ServiceMoniker, ServiceRegistration>.Empty, isClientOfExclusiveServer: false, joinableTaskFactory: null, traceSource) 23=> ImmutableDictionary<string, string>.Empty; 33internal ImmutableDictionary<ServiceMoniker, ServiceRegistration> GetRegisteredServices() 71return new(ImmutableDictionary<string, string>.Empty);
BrokeredServices\Services\Descriptors.cs (1)
40public static ImmutableDictionary<ServiceMoniker, ServiceRegistration> RemoteServicesToRegister = new Dictionary<ServiceMoniker, ServiceRegistration>
HostWorkspace\LanguageServerProjectSystem.cs (3)
55private readonly ImmutableDictionary<string, string> AdditionalProperties; 86? ImmutableDictionary<string, string>.Empty 87: ImmutableDictionary<string, string>.Empty.Add("RazorDesignTimeTargets", razorDesignTimePath);
HostWorkspace\ProjectDependencyHelper.cs (3)
71var projectAssetsMap = CreateProjectAssetsMap(lockFile); 107static ImmutableDictionary<string, ImmutableArray<NuGetVersion>> CreateProjectAssetsMap(LockFile lockFile) 110var map = lockFile.Libraries
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
99private static ImmutableDictionary<string, int> GetUniqueHashedFileExtensionsAndCounts(ProjectFileInfo projectFileInfo)
Services\ExtensionAssemblyManager.cs (4)
33private readonly ImmutableDictionary<string, AssemblyLoadContext> _directoryLoadContexts; 35private readonly ImmutableDictionary<string, AssemblyLoadContext> _assemblyFullNameToLoadContext; 39public ExtensionAssemblyManager(ImmutableDictionary<string, AssemblyLoadContext> directoryLoadContexts, 40ImmutableDictionary<string, AssemblyLoadContext> assemblyFullNameToLoadContext,
Microsoft.CodeAnalysis.LanguageServer.Protocol (143)
Extensions\ProtocolConversions.cs (2)
53public static readonly ImmutableDictionary<string, ImmutableArray<LSP.CompletionItemKind>> RoslynTagToCompletionItemKinds = new Dictionary<string, ImmutableArray<LSP.CompletionItemKind>>() 100public static readonly ImmutableDictionary<string, ImmutableArray<LSP.CompletionItemTag>> RoslynTagToCompletionItemTags = new Dictionary<string, ImmutableArray<LSP.CompletionItemTag>>()
Features\CodeFixes\CodeFixService.cs (39)
44private readonly ImmutableDictionary<string, ImmutableArray<Lazy<CodeFixProvider, CodeChangeProviderMetadata>>> _fixersPerLanguageMap; 46private readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>> _projectFixersMap = new(); 49private readonly ImmutableDictionary<LanguageKind, Lazy<ImmutableArray<IConfigurationFixProvider>>> _configurationProvidersMap; 52private ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>>? _lazyWorkspaceFixersMap; 53private ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<CodeFixProvider, int>>>? _lazyFixerPriorityMap; 55private ImmutableDictionary<CodeFixProvider, ImmutableArray<DiagnosticId>> _fixerToFixableIdsMap = ImmutableDictionary<CodeFixProvider, ImmutableArray<DiagnosticId>>.Empty; 56private ImmutableDictionary<object, FixAllProviderInfo?> _fixAllProviderMap = ImmutableDictionary<object, FixAllProviderInfo?>.Empty; 57private ImmutableDictionary<CodeFixProvider, CodeChangeProviderMetadata?> _fixerToMetadataMap = ImmutableDictionary<CodeFixProvider, CodeChangeProviderMetadata?>.Empty; 89var hasWorkspaceFixers = TryGetWorkspaceFixersMap(document, out var workspaceFixersMap); 90var projectFixersMap = GetProjectFixers(document); 356private bool TryGetWorkspaceFixersMap(TextDocument document, [NotNullWhen(true)] out ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>? fixerMap) 360var workspaceFixersMap = GetFixerPerLanguageMap(document.Project.Solution.Services); 366fixerMap = ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>.Empty; 382private bool TryGetWorkspaceFixersPriorityMap(TextDocument document, [NotNullWhen(true)] out Lazy<ImmutableDictionary<CodeFixProvider, int>>? fixersPriorityMap) 386var fixersPriorityByLanguageMap = GetFixerPriorityPerLanguageMap(document.Project.Solution.Services); 444var hasAnySharedFixer = TryGetWorkspaceFixersMap(document, out var fixerMap); 446var projectFixersMap = GetProjectFixers(document); 867private ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>> GetFixerPerLanguageMap( 870var fixerMap = ImmutableDictionary.Create<LanguageKind, Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>>(); 874var lazyMap = new Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>(() => 905private static ImmutableDictionary<LanguageKind, Lazy<ImmutableArray<IConfigurationFixProvider>>> GetConfigurationProvidersPerLanguageMap( 930private ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<CodeFixProvider, int>>> GetFixerPriorityPerLanguageMap(SolutionServices services) 932var languageMap = ImmutableDictionary.CreateBuilder<LanguageKind, Lazy<ImmutableDictionary<CodeFixProvider, int>>>(); 935var lazyMap = new Lazy<ImmutableDictionary<CodeFixProvider, int>>(() => 957private ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>> GetProjectFixers(TextDocument document) 961? ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>.Empty 965private ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>> ComputeProjectFixers(TextDocument document) 996private readonly ImmutableDictionary<CodeFixProvider, int> _priorityMap; 1000ImmutableDictionary<CodeFixProvider, int> priorityMap) 1037public ImmutableDictionary<LanguageKind, Lazy<ImmutableDictionary<CodeFixProvider, int>>> GetFixerPriorityPerLanguageMap(SolutionServices services)
Features\Diagnostics\DocumentAnalysisExecutor.cs (3)
37private ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>? _lazySyntaxDiagnostics; 38private ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>? _lazySemanticDiagnostics; 182private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetAnalysisResultAsync(DocumentAnalysisScope analysisScope, CancellationToken cancellationToken)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
124properties: ImmutableDictionary<string, string?>.Empty,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.AnalysisData.cs (6)
80public readonly ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> Result; 85public readonly ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>? OldResult; 87public ProjectAnalysisData(ProjectId projectId, VersionStamp version, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result) 99ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> oldResult, 100ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> newResult) 141return new ProjectAnalysisData(project.Id, VersionStamp.Default, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>.Empty);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (1)
72private static DiagnosticAnalysisResult GetResultOrEmpty(ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> map, DiagnosticAnalyzer analyzer, ProjectId projectId, VersionStamp version)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (21)
40var result = await ComputeDiagnosticsAsync(compilationWithAnalyzers, project, stateSets, existingData.Result, cancellationToken).ConfigureAwait(false); 56private static async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> RemoveCompilerSemanticErrorsIfProjectNotLoadedAsync( 57ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result, Project project, CancellationToken cancellationToken) 91private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticsAsync( 96var result = ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>.Empty; 122private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticsAsync( 124ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> existing, CancellationToken cancellationToken) 164private static ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> MergeExistingDiagnostics( 165VersionStamp version, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> existing, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result) 188ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> existing, 236private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> MergeProjectDiagnosticAnalyzerDiagnosticsAsync( 240ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result, 296private async Task<(ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> results, ImmutableHashSet<Document>? failedDocuments)> UpdateWithDocumentLoadAndGeneratorFailuresAsync( 297ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> results, 303ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Builder? lazyLoadDiagnostics = null; 323syntaxLocalMap: lazyLoadDiagnostics?.ToImmutable() ?? ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 324semanticLocalMap: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 325nonLocalMap: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 345private void UpdateAnalyzerTelemetryData(ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> telemetry)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (2)
46public async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDiagnosticsAsync( 51Func<DocumentAnalysisExecutor, CancellationToken, Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>>> computeDiagnosticsNonIncrementallyAsync,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.InProcOrRemoteHostAnalyzerRunner.cs (5)
140var builderMap = ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>.Empty; 151var telemetry = ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo>.Empty; 264private static ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> Hydrate(ImmutableArray<(DocumentId documentId, ImmutableArray<DiagnosticData> diagnostics)> diagnosticByDocument, Project project)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (7)
459private ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Builder? _syntaxLocals; 460private ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Builder? _semanticLocals; 461private ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Builder? _nonLocals; 483private void Add(ref ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Builder? locals, DocumentId documentId, ImmutableArray<DiagnosticData> diagnostics) 497_syntaxLocals?.ToImmutable() ?? ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 498_semanticLocals?.ToImmutable() ?? ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 499_nonLocals?.ToImmutable() ?? ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (6)
30private ImmutableDictionary<HostAnalyzerStateSetKey, HostAnalyzerStateSets> _hostAnalyzerStateMap; 36private ImmutableDictionary<ProjectId, ProjectAnalyzerStateSets> _projectAnalyzerStateMap; 54_hostAnalyzerStateMap = ImmutableDictionary<HostAnalyzerStateSetKey, HostAnalyzerStateSets>.Empty; 55_projectAnalyzerStateMap = ImmutableDictionary<ProjectId, ProjectAnalyzerStateSets>.Empty; 105var hostStateSetMap = GetOrCreateHostStateSets(project, projectStateSets).StateSetMap; 133private static ImmutableDictionary<DiagnosticAnalyzer, StateSet> CreateStateSetMap(
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.HostStates.cs (7)
45var analyzersPerReference = state.HostAnalyzers.GetOrCreateHostDiagnosticAnalyzersPerReference(language); 48var analyzerMap = CreateStateSetMap(language, projectAnalyzerCollection, hostAnalyzerCollection, includeWorkspacePlaceholderAnalyzers: true); 54ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> analyzersPerReference, 117public readonly ImmutableDictionary<DiagnosticAnalyzer, StateSet> StateSetMap; 119private HostAnalyzerStateSets(ImmutableDictionary<DiagnosticAnalyzer, StateSet> stateSetMap, ImmutableArray<StateSet> orderedStateSets) 125public HostAnalyzerStateSets(ImmutableDictionary<DiagnosticAnalyzer, StateSet> analyzerMap) 142var stateSetMap = StateSetMap.Where(kvp => !excludedAnalyzers.Contains(kvp.Key)).ToImmutableDictionary();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (10)
24ImmutableDictionary<DiagnosticAnalyzer, StateSet>.Empty, 30public readonly ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> MapPerReferences; 32public readonly ImmutableDictionary<DiagnosticAnalyzer, StateSet> StateSetMap; 38ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> mapPerReferences, 39ImmutableDictionary<DiagnosticAnalyzer, StateSet> stateSetMap, 89var newMap = CreateStateSetMap(project.Language, analyzersPerReference.Values, [], includeWorkspacePlaceholderAnalyzers: false); 126ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> newMapPerReference, 127ImmutableDictionary<DiagnosticAnalyzer, StateSet> newMap) 159ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> mapPerReference, 160ImmutableDictionary<DiagnosticAnalyzer, StateSet> map)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (2)
386ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> diagnosticsMap; 505private async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDocumentDiagnosticsCoreAsync(
Features\Options\SolutionAnalyzerConfigOptionsUpdater.cs (3)
54var oldFallbackOptions = oldSolution.FallbackAnalyzerOptions; 55var newFallbackOptions = oldFallbackOptions; 59ImmutableDictionary<string, string>.Builder? lazyBuilder = null;
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
281ImmutableDictionary<CodeFixGroupKey, IList<IUnifiedSuggestedAction>> map,
Handler\AbstractRefreshQueue.cs (1)
112var trackedDocuments = lspWorkspaceManager.GetTrackedLspText();
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (2)
42private static readonly ImmutableDictionary<string, string> s_languageNameToPrefix = ImmutableDictionary<string, string>.Empty
Handler\Diagnostics\BuildOnlyDiagnosticIdsHandler.cs (1)
34private readonly ImmutableDictionary<string, string[]> _compilerBuildOnlyDiagnosticIds = compilerBuildOnlyDiagnosticsProviders
Handler\Diagnostics\DiagnosticSourceProviders\DiagnosticSourceManager.cs (3)
28private readonly ImmutableDictionary<string, IDiagnosticSourceProvider> _nameToDocumentProviderMap; 33private readonly ImmutableDictionary<string, IDiagnosticSourceProvider> _nameToWorkspaceProviderMap; 63ImmutableDictionary<string, IDiagnosticSourceProvider> nameToProviderMap,
Handler\Diagnostics\DiagnosticSources\TaskListDiagnosticSource.cs (7)
23private static readonly ImmutableDictionary<string, string?> s_lowPriorityProperties = ImmutableDictionary<string, string?>.Empty.Add(Priority, Low); 24private static readonly ImmutableDictionary<string, string?> s_mediumPriorityProperties = ImmutableDictionary<string, string?>.Empty.Add(Priority, Medium); 25private static readonly ImmutableDictionary<string, string?> s_highPriorityProperties = ImmutableDictionary<string, string?>.Empty.Add(Priority, High); 64private static ImmutableDictionary<string, string?> GetProperties(TaskListItemPriority priority)
Handler\InlineCompletions\InlineCompletionsHandler.cs (1)
245private static async Task<(string ReplacedSnippetText, ImmutableDictionary<SnippetFieldPart, ImmutableArray<TextSpan>> Fields, TextSpan? CaretSpan)> GetReplacedSnippetTextAsync(
Handler\RequestContext.cs (3)
45private readonly ImmutableDictionary<Uri, (SourceText Text, string LanguageId)> _trackedDocuments; 177ImmutableDictionary<Uri, (SourceText Text, string LanguageId)> trackedDocuments, 243var trackedDocuments = lspWorkspaceManager.GetTrackedLspText();
Handler\SemanticTokens\CustomLspSemanticTokenNames.cs (1)
84public static ImmutableDictionary<string, string> ClassificationTypeNameToCustomTokenName = new Dictionary<string, string>
Handler\SemanticTokens\SemanticTokensSchema.cs (2)
23private static readonly ImmutableDictionary<string, string> s_vsDirectTypeMap = new Dictionary<string, string>() 38private static readonly ImmutableDictionary<string, string> s_pureLspDirectTypeMap = s_vsDirectTypeMap.Concat(new Dictionary<string, string>
Workspaces\LspWorkspaceManager.cs (6)
115private ImmutableDictionary<Uri, (SourceText Text, string LanguageId)> _trackedDocuments = ImmutableDictionary<Uri, (SourceText, string)>.Empty.WithComparers(LspUriComparer.Instance); 247public ImmutableDictionary<Uri, (SourceText Text, string LanguageId)> GetTrackedLspText() => _trackedDocuments; 394var documentsInWorkspace = GetDocumentsForUris(_trackedDocuments.Keys.ToImmutableArray(), workspaceCurrentSolution); 504private async Task<bool> DoesAllTextMatchWorkspaceSolutionAsync(ImmutableDictionary<Uri, ImmutableArray<TextDocument>> documentsInWorkspace, CancellationToken cancellationToken) 557private static ImmutableDictionary<Uri, ImmutableArray<TextDocument>> GetDocumentsForUris(ImmutableArray<Uri> trackedDocuments, Solution workspaceCurrentSolution)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Diagnostics\AdditionalFileDiagnosticsTests.cs (1)
118=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(
Diagnostics\DiagnosticsPullCacheTests.cs (1)
124isEnabledByDefault: true, warningLevel: 0, [], ImmutableDictionary<string, string?>.Empty,context.Document!.Project.Id,
Diagnostics\NonLocalDiagnosticTests.cs (1)
71=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(
Diagnostics\PullDiagnosticTests.cs (1)
1289properties: ImmutableDictionary<string, string?>.Empty,
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (1)
67=> new(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (1)
113var optionsAfterProjectAdded = workspace.CurrentSolution.FallbackAnalyzerOptions;
ProtocolConversionsTests.cs (1)
180var map = ProtocolConversions.RoslynTagToCompletionItemKinds;
Microsoft.CodeAnalysis.PooledObjects.Package (3)
PooledDictionary.cs (3)
24public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 26var result = this.ToImmutableDictionary(this.Comparer); 31public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
DeterministicKeyBuilderTests.cs (1)
402var map = values.ToImmutableDictionary(
Microsoft.CodeAnalysis.Remote.ServiceHub (16)
Host\AssetProvider.cs (1)
109tasks.Add(this.GetAssetAsync<ImmutableDictionary<string, StructuredAnalyzerConfigOptions>>(
Host\RemoteWorkspace.SolutionCreator.cs (1)
83solution = solution.WithFallbackAnalyzerOptions(await _assetProvider.GetAssetAsync<ImmutableDictionary<string, StructuredAnalyzerConfigOptions>>(
Services\ClientOptionsProvider.cs (2)
17private ImmutableDictionary<string, AsyncLazy<TOptions>> _cache = ImmutableDictionary<string, AsyncLazy<TOptions>>.Empty;
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (3)
404var builderMap = ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>.Empty; 421ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder> builderMap,
src\VisualStudio\Core\Def\Telemetry\Shared\AbstractAggregatingLog.cs (3)
31private ImmutableDictionary<string, (TAggregator aggregator, TelemetryEvent TelemetryEvent, object Lock)> _aggregations = ImmutableDictionary<string, (TAggregator, TelemetryEvent, object)>.Empty; 125_aggregations = ImmutableDictionary<string, (TAggregator, TelemetryEvent, object)>.Empty;
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogProvider.cs (6)
23private ImmutableDictionary<FunctionId, VisualStudioTelemetryLog> _logs = ImmutableDictionary<FunctionId, VisualStudioTelemetryLog>.Empty; 28private ImmutableDictionary<FunctionId, AggregatingHistogramLog> _histogramLogs = ImmutableDictionary<FunctionId, AggregatingHistogramLog>.Empty; 33private ImmutableDictionary<FunctionId, AggregatingCounterLog> _counterLogs = ImmutableDictionary<FunctionId, AggregatingCounterLog>.Empty;
Microsoft.CodeAnalysis.Remote.Workspaces (7)
AbstractAssetProvider.cs (1)
61var fallbackAnalyzerOptions = await GetAssetAsync<ImmutableDictionary<string, StructuredAnalyzerConfigOptions>>(AssetPathKind.SolutionFallbackAnalyzerOptions, solutionChecksums.FallbackAnalyzerOptions, cancellationToken).ConfigureAwait(false);
ExternalAccess\Pythia\Api\PythiaRemoteServiceCallbackDispatcherRegistry.cs (1)
16private readonly ImmutableDictionary<Type, PythiaRemoteServiceCallbackDispatcher> _lazyDispatchers;
ExternalAccess\UnitTesting\Api\UnitTestingRemoteServiceCallbackDispatcherRegistry.cs (1)
16private readonly ImmutableDictionary<Type, UnitTestingRemoteServiceCallbackDispatcher> _lazyDispatchers;
ServiceDescriptors.cs (2)
93private readonly ImmutableDictionary<Type, (ServiceDescriptor descriptorCoreClr64, ServiceDescriptor descriptorCoreClr64ServerGC)> _descriptors; 169public ImmutableDictionary<Type, (ServiceDescriptor descriptorCoreClr64, ServiceDescriptor descriptorCoreClr64ServerGC)> Descriptors
VisualStudioMefHostServices.cs (2)
23private ImmutableDictionary<ExportKey, IEnumerable> _exportsMap 24= ImmutableDictionary<ExportKey, IEnumerable>.Empty;
Microsoft.CodeAnalysis.Scripting (4)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (4)
36internal ImmutableDictionary<string, string> TrustedPlatformAssemblies; 85ImmutableDictionary<string, string> trustedPlatformAssemblies, 204internal static ImmutableDictionary<string, string> GetTrustedPlatformAssemblies(ImmutableArray<string> paths) 208return ImmutableDictionary<string, string>.Empty;
Microsoft.CodeAnalysis.Scripting.UnitTests (2)
RuntimeMetadataReferenceResolverTests.cs (2)
32packageResolver: new PackageResolver(ImmutableDictionary<string, ImmutableArray<string>>.Empty.Add("nuget:N/1.0", ImmutableArray.Create(assembly1.Path, assembly2.Path))), 34trustedPlatformAssemblies: ImmutableDictionary<string, string>.Empty);
Microsoft.CodeAnalysis.Test.Utilities (17)
Compilation\CompilationTestDataExtensions.cs (3)
48private static bool TryGetMethodData(ImmutableDictionary<string, CompilationTestData.MethodData> map, string qualifiedMethodName, out CompilationTestData.MethodData methodData) 82var map = data.GetMethodsByName(); 88var map = data.GetMethodsByName();
CompilationVerifier.cs (1)
644var documentMap = ILValidation.GetDocumentIdToPathMap(xmlDocument);
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
53private static readonly ImmutableDictionary<string, string> s_properties =
Diagnostics\DiagnosticExtensions.cs (2)
401public static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> GetCompilerDiagnosticAnalyzersMap() 415public static ImmutableDictionary<string, ImmutableArray<AnalyzerReference>> GetCompilerDiagnosticAnalyzerReferencesMap()
MarkedSource\SourceWithMarkedNodes.cs (4)
107public ImmutableDictionary<SyntaxNode, int> MapSyntaxNodesToMarks() 112public ImmutableDictionary<int, SyntaxNode> MapMarksToSyntaxNodes() 135var map0 = source0.MapMarksToSyntaxNodes(); 136var map1 = source1.MapSyntaxNodesToMarks();
Metadata\ILValidation.cs (1)
339public static ImmutableDictionary<string, string> GetDocumentIdToPathMap(XElement document)
PDB\DeterministicBuildCompilationTestHelpers.cs (3)
25public static void VerifyPdbOption<T>(this ImmutableDictionary<string, string> pdbOptions, string pdbName, T expectedValue, Func<T, bool> isDefault = null, Func<T, string> toString = null) 47internal static void AssertCommonOptions(EmitOptions emitOptions, CompilationOptions compilationOptions, Compilation compilation, ImmutableDictionary<string, string> pdbOptions) 152public static ImmutableDictionary<string, string> ParseCompilationOptions(BlobReader blobReader)
TestHelpers.cs (2)
26public static ImmutableDictionary<K, V> CreateImmutableDictionary<K, V>( 31public static ImmutableDictionary<K, V> CreateImmutableDictionary<K, V>(params (K, V)[] entries)
Microsoft.CodeAnalysis.UnitTests (5)
Analyzers\AnalyzerConfigTests.cs (2)
1266var treeOptions = options[i].TreeOptions; 1538Assert.Equal(new ImmutableDictionary<string, ReportDiagnostic>[]
Analyzers\DictionaryAnalyzerConfigOptionsTests.cs (1)
25typeof(ImmutableDictionary<string, string>),
Collections\TestExtensionsMethods.nonnetstandard.cs (2)
34ImmutableDictionary<TKey, TValue> d => d.ToBuilder(), 47ImmutableDictionary<TKey, TValue> d => d.KeyComparer,
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)
1793diagnosticBuilder As ArrayBuilder(Of Diagnostic)) As ImmutableDictionary(Of String, InternalSyntax.CConst) 1816Private Shared Function InternalDefinesToPublicSymbols(defines As ImmutableDictionary(Of String, InternalSyntax.CConst)) As IReadOnlyDictionary(Of String, Object) 1846Dim defines As ImmutableDictionary(Of String, InternalSyntax.CConst) = PublicSymbolsToInternalDefines(symbols, diagnosticBuilder)
Compilation\VisualBasicCompilation.vb (8)
90Private ReadOnly _syntaxTreeOrdinalMap As ImmutableDictionary(Of SyntaxTree, Integer) 102Private ReadOnly _rootNamespaces As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry) 421syntaxTreeOrdinalMap As ImmutableDictionary(Of SyntaxTree, Integer), 422rootNamespaces As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry), 527syntaxTreeOrdinalMap As ImmutableDictionary(Of SyntaxTree, Integer), 528rootNamespaces As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry), 980ByRef declMap As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry), 1049ByRef declMap As ImmutableDictionary(Of SyntaxTree, DeclarationTableEntry),
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
106Dim 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)
164Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing) As SyntaxTree 239Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing, 249Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing, 266Optional diagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing, 282Optional 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.ExpressionCompiler (14)
CompilationContext.vb (5)
37Private ReadOnly _displayClassVariables As ImmutableDictionary(Of String, DisplayClassVariable) 115_displayClassVariables = ImmutableDictionary(Of String, DisplayClassVariable).Empty 976displayClassVariables As ImmutableDictionary(Of String, DisplayClassVariable)) As ImmutableArray(Of LocalSymbol) 1052<Out> ByRef displayClassVariables As ImmutableDictionary(Of String, DisplayClassVariable)) 1125displayClassVariables = ImmutableDictionary(Of String, DisplayClassVariable).Empty
Rewriters\CapturedVariableRewriter.vb (3)
14displayClassVariables As ImmutableDictionary(Of String, DisplayClassVariable), 23Private ReadOnly _displayClassVariables As ImmutableDictionary(Of String, DisplayClassVariable) 28displayClassVariables As ImmutableDictionary(Of String, DisplayClassVariable),
Symbols\EEMethodSymbol.vb (4)
36Private ReadOnly _displayClassVariables As ImmutableDictionary(Of String, DisplayClassVariable) 60sourceDisplayClassVariables As ImmutableDictionary(Of String, DisplayClassVariable), 150oldDisplayClassVariables As ImmutableDictionary(Of String, DisplayClassVariable), 153typeMap As TypeSubstitution) As ImmutableDictionary(Of String, DisplayClassVariable)
VisualBasicExpressionCompiler.vb (1)
160Dim assemblyContexts = If(previous.Matches(metadataBlocks), previous.AssemblyContexts, ImmutableDictionary(Of MetadataContextId, VisualBasicMetadataContext).Empty)
VisualBasicInstructionDecoder.vb (1)
99Dim assemblyContexts = If(previous.Matches(metadataBlocks), previous.AssemblyContexts, ImmutableDictionary(Of MetadataContextId, VisualBasicMetadataContext).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.Syntax.UnitTests (4)
Syntax\SyntaxTreeTests.vb (4)
49Assert.NotSame(ImmutableDictionary(Of String, ReportDiagnostic).Empty, tree.DiagnosticOptions) 56diagnosticOptions:=ImmutableDictionary(Of String, ReportDiagnostic).Empty) 59Assert.Same(ImmutableDictionary(Of String, ReportDiagnostic).Empty, tree.DiagnosticOptions) 90Dim newTree = tree.WithDiagnosticOptions(ImmutableDictionary(Of String, ReportDiagnostic).Empty)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
ParserTestUtilities.vb (2)
539Public Overrides ReadOnly Property DiagnosticOptions As ImmutableDictionary(Of String, ReportDiagnostic) 557Public Overrides Function WithDiagnosticOptions(options As ImmutableDictionary(Of String, ReportDiagnostic)) As SyntaxTree
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
LanguageServices\FixAllSpanMappingService\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)
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
46Private ReadOnly _renameLocations As ImmutableDictionary(Of TextSpan, RenameLocation) 81Private ReadOnly _stringAndCommentTextSpans As ImmutableDictionary(Of TextSpan, ImmutableSortedSet(Of TextSpan))
Microsoft.CodeAnalysis.Workspaces (400)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (4)
81var documentToDiagnostics = await DetermineDiagnosticsAsync(fixAllContext, progressTracker).ConfigureAwait(false); 87private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> DetermineDiagnosticsAsync(FixAllContext fixAllContext, IProgress<CodeAnalysisProgress> progressTracker) 91var documentToDiagnostics = await fixAllContext.GetDocumentDiagnosticsToFixAsync().ConfigureAwait(false); 111ImmutableDictionary<Document, ImmutableArray<Diagnostic>> documentToDiagnostics)
CodeFixes\FixAllOccurrences\DocumentBasedFixAllProvider.cs (1)
81var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(fixAllContext).ConfigureAwait(false);
CodeFixes\FixAllOccurrences\FixAllContext.cs (2)
347internal Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync() 350internal 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\FixAllContextHelper.cs (6)
21public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 40return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty.SetItem(document, documentDiagnostics); 53var documentsAndSpans = await spanMappingService.GetFixAllSpansAsync(document, 102return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty; 108static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetSpanDiagnosticsAsync( 126private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
CodeFixes\FixAllOccurrences\FixAllState.cs (2)
65ImmutableDictionary<Document, ImmutableArray<Diagnostic>> diagnosticsToFix, 87ImmutableDictionary<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)
156public static void LogDiagnosticsStats(int correlationId, ImmutableDictionary<Document, ImmutableArray<Diagnostic>> documentsAndDiagnosticsToFixMap) 166public static void LogDiagnosticsStats(int correlationId, ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectsAndDiagnosticsToFixMap)
CodeRefactorings\FixAllOccurences\DocumentBasedFixAllProvider.cs (1)
90var documentsAndSpansToFix = await fixAllContext.GetFixAllSpansAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\FixAllOccurences\FixAllContext.cs (1)
96public Task<ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>> GetFixAllSpansAsync(CancellationToken cancellationToken)
CodeRefactorings\FixAllOccurences\FixAllState.cs (4)
90internal async Task<ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>> GetFixAllSpansAsync(CancellationToken cancellationToken) 99return ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>.Empty; 101var spansByDocument = await spanMappingService.GetFixAllSpansAsync( 120return ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>.Empty;
Diagnostics\AbstractDiagnosticPropertiesService.cs (2)
13public ImmutableDictionary<string, string> GetAdditionalProperties(Diagnostic diagnostic) 18private static ImmutableDictionary<string, string> GetAdditionalProperties(
Diagnostics\AnalysisResultPair.cs (29)
16private ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>? _lazyMergedSyntaxDiagnostics; 17private ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>? _lazyMergedSemanticDiagnostics; 18private ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>? _lazyMergedAdditionalFileDiagnostics; 19private ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>? _lazyMergedCompilationDiagnostics; 20private ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo>? _lazyMergedAnalyzerTelemetryInfo; 40public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> MergedSyntaxDiagnostics 65public ImmutableDictionary<SyntaxTree, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> MergedSemanticDiagnostics 90public ImmutableDictionary<AdditionalText, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> MergedAdditionalFileDiagnostics 115public ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> MergedCompilationDiagnostics 140public ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> MergedAnalyzerTelemetryInfo 173private static ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> MergeDiagnostics<TKey>( 174ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> first, 175ImmutableDictionary<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>> second) 181if (!localSyntaxDiagnostics.TryGetValue(tree, out var projectSyntaxDiagnostics)) 193private static ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> MergeDiagnostics( 194ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> first, 195ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> second) 212private static ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> MergeTelemetry( 213ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> first, 214ImmutableDictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo> second)
Diagnostics\DiagnosticAnalysisResult.cs (23)
36private readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>? _syntaxLocals; 41private readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>? _semanticLocals; 46private readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>? _nonLocals; 70ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> syntaxLocals, 71ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> semanticLocals, 72ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> nonLocals, 101syntaxLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 102semanticLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 103nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 148syntaxLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 150nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 160ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> syntaxLocalMap, 161ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> semanticLocalMap, 162ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> nonLocalMap, 202private ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>? GetMap(AnalysisKind kind) 248var map = GetMap(kind); 285semanticLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 286nonLocals: ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>.Empty, 293ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>? syntaxLocals, 294ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>? semanticLocals, 295ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>>? nonLocals) 298var allEmpty = syntaxLocals ?? semanticLocals ?? nonLocals; 324private static void VerifyDocumentMap(Project project, ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> map)
Diagnostics\DiagnosticAnalysisResultBuilder.cs (5)
33public readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> SyntaxLocals => Convert(_lazySyntaxLocals); 34public readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> SemanticLocals => Convert(_lazySemanticLocals); 35public readonly ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> NonLocals => Convert(_lazyNonLocals); 195private static ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> Convert(Dictionary<DocumentId, List<DiagnosticData>>? map) 198? 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 (6)
29ImmutableDictionary<string, string?> properties, 64public readonly ImmutableDictionary<string, string?> Properties = properties; 96internal static ImmutableDictionary<string, string> PropertiesForBuildDiagnostic { get; } 97= ImmutableDictionary<string, string>.Empty.Add(WellKnownDiagnosticPropertyNames.Origin, WellKnownDiagnosticTags.Build); 226ImmutableDictionary<string, string?>? additionalProperties) 248private static ImmutableDictionary<string, string?>? GetAdditionalProperties(TextDocument document, Diagnostic diagnostic)
Diagnostics\Extensions.cs (3)
101public static async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>> ToResultBuilderMapAsync( 148ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>? diagnosticsByAnalyzerMap; 239ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>> diagnosticsByAnalyzer,
Diagnostics\HostDiagnosticAnalyzers.cs (32)
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) 78public ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsPerReference(DiagnosticAnalyzerInfoCache infoCache) 85public ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsPerReference(DiagnosticAnalyzerInfoCache infoCache, Project project) 87var descriptorPerReference = CreateDiagnosticDescriptorsPerReference(infoCache, CreateDiagnosticAnalyzersPerReference(project)); 88var map = _hostAnalyzerReferencesMap.AddRange(CreateProjectAnalyzerReferencesMap(project.AnalyzerReferences)); 92private static ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> ConvertReferenceIdentityToName( 93ImmutableDictionary<object, ImmutableArray<DiagnosticDescriptor>> descriptorsPerReference, 94ImmutableDictionary<object, AnalyzerReference> map) 124public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateDiagnosticAnalyzersPerReference(Project project) 126var hostAnalyzerReferences = GetOrCreateHostDiagnosticAnalyzersPerReference(project.Language); 127var projectAnalyzerReferences = CreateProjectDiagnosticAnalyzersPerReference(project.AnalyzerReferences, project.Language); 136public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateProjectDiagnosticAnalyzersPerReference(Project project) 139public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateProjectDiagnosticAnalyzersPerReference(IReadOnlyList<AnalyzerReference> projectAnalyzerReferences, string language) 156private ImmutableDictionary<object, AnalyzerReference> CreateProjectAnalyzerReferencesMap(IReadOnlyList<AnalyzerReference> projectAnalyzerReferences) 159private static ImmutableDictionary<object, ImmutableArray<DiagnosticDescriptor>> CreateDiagnosticDescriptorsPerReference( 161ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> analyzersMap) 180private ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateHostDiagnosticAnalyzersAndBuildMap(string language) 219private static ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateDiagnosticAnalyzersPerReferenceMap( 260private static ImmutableDictionary<object, AnalyzerReference> CreateAnalyzerReferencesMap(IEnumerable<AnalyzerReference> analyzerReferences) 279private static ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> MergeDiagnosticAnalyzerMap( 280ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> map1, 281ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> map2) 283var current = map1; 310box.Value ??= ImmutableDictionary<string, SkippedHostAnalyzersInfo>.Empty;
Diagnostics\IDiagnosticPropertiesService.cs (1)
14ImmutableDictionary<string, string> GetAdditionalProperties(Diagnostic diagnostic);
Diagnostics\SkippedHostAnalyzersInfo.cs (2)
37public ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<string>> FilteredDiagnosticIdsForAnalyzers { get; } 41ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<string>> filteredDiagnosticIdsForAnalyzers)
Editing\SymbolEditor.cs (1)
129private ImmutableDictionary<string, ImmutableArray<ProjectId>> _assemblyNameToProjectIdMap;
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex.cs (1)
40public ImmutableDictionary<string, ImmutableArray<int>> ReceiverTypeNameToExtensionMethodMap
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex.ExtensionMethodInfo.cs (2)
14private readonly struct ExtensionMethodInfo(ImmutableDictionary<string, ImmutableArray<int>> receiverTypeNameToExtensionMethodMap) 42public readonly ImmutableDictionary<string, ImmutableArray<int>> ReceiverTypeNameToExtensionMethodMap { get; } = receiverTypeNameToExtensionMethodMap;
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (3)
19protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 22public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 31private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
LanguageServices\FixAllSpanMappingService\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
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 (2)
34private ImmutableDictionary<OptionKey2, object?> _currentValues = ImmutableDictionary.Create<OptionKey2, object?>(); 160private static object? GetOption_NoLock(ref ImmutableDictionary<OptionKey2, object?> currentValues, OptionKey2 optionKey, ImmutableArray<IOptionPersister> persisters)
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\MutableConflictResolution.cs (1)
153var documentToRelatedLocationsMap = this.RelatedLocations.GroupBy(loc => loc.DocumentId).ToImmutableDictionary(
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
224public ImmutableDictionary<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>> GetDocumentToModifiedSpansMap() 234public 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)
215ImmutableDictionary<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>> documentToModifiedSpansMap, 216ImmutableDictionary<DocumentId, ImmutableArray<ComplexifiedSpan>> documentToComplexifiedSpansMap, 217ImmutableDictionary<DocumentId, ImmutableArray<RelatedLocation>> documentToRelatedLocationsMap) 235public readonly ImmutableDictionary<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>> DocumentToModifiedSpansMap = documentToModifiedSpansMap; 238public readonly ImmutableDictionary<DocumentId, ImmutableArray<ComplexifiedSpan>> DocumentToComplexifiedSpansMap = documentToComplexifiedSpansMap; 241public 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;
SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (8)
59private ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> _semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 68var map = _semanticModelMap; 77_semanticModelMap = ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>.Empty; 103var originalMap = _semanticModelMap; 127private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 128ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map, Document document, SyntaxNode bodyNode, CancellationToken cancellationToken) 165ImmutableDictionary<DocumentId, SemanticModelReuseInfo?> map,
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)
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\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (2)
682public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 693public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
148internal static GeneratedKind GetGeneratedCodeKindFromOptions(ImmutableDictionary<string, string> options)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (3)
18/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 22/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 32/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\Dependencies\PooledObjects\PooledDictionary.cs (3)
24public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 26var result = this.ToImmutableDictionary(this.Comparer); 31public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
48public static readonly StructuredAnalyzerConfigOptions Empty = Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
38ImmutableDictionary<string, ReportDiagnostic>? treeOptions)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
181public ImmutableDictionary<CaptureId, FlowCaptureKind> LValueFlowCapturesInGraph { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
15ImmutableDictionary<(ISymbol symbol, IOperation write), bool> symbolWritesMap, 35public ImmutableDictionary<(ISymbol symbol, IOperation write), bool> SymbolWritesMap { get; } = symbolWritesMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (5)
55var serializedNameMap = AssignNamesToNamingStyleElements(symbolSpecifications, namingStyles); 56var ruleNameMap = AssignNamesToNamingStyleRules(serializableNamingRules, serializedNameMap); 107private static ImmutableDictionary<Guid, string> AssignNamesToNamingStyleElements( 159private static ImmutableDictionary<SerializableNamingRule, string> AssignNamesToNamingStyleRules(ImmutableArray<SerializableNamingRule> namingRules, ImmutableDictionary<Guid, string> serializedNameMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
110=> CreateSerializerForEnum(map, ImmutableDictionary<string, T>.Empty); 116public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum 127var alternativeMap = ImmutableDictionary<string, T>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (2)
15using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 37!treeMap.TryGetValue((semanticModel.SyntaxTree, namespaceId), out var symbolMap))
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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
43ImmutableDictionary<string, string?> properties,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
264ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewFieldMap, bool isContainedInUnsafeType) 286ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string>? parameterToNewPropertyMap, bool isContainedInUnsafeType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
464ImmutableDictionary<string, ISymbol>? parameterToExistingMemberMap, 465ImmutableDictionary<string, string>? parameterToNewMemberMap,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
20private static readonly ImmutableDictionary<BinaryOperatorKind, BinaryOperatorKind> s_negatedBinaryMap =
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (2)
26private ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 27= ImmutableDictionary<Type, (Lazy<ILanguageService, LanguageServiceMetadata>? lazyService, bool usesFactory)>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (6)
28private ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)> _serviceMap 29= ImmutableDictionary<Type, (Lazy<IWorkspaceService, WorkspaceServiceMetadata>? lazyService, bool usesFactory)>.Empty; 35private ImmutableDictionary<string, MefLanguageServices> _languageServicesMap 36= ImmutableDictionary<string, MefLanguageServices>.Empty; 75var allLanguageServices = Interlocked.Exchange(ref _languageServicesMap, _languageServicesMap.Clear()); 178var currentServicesMap = _languageServicesMap;
Workspace\Host\Metadata\MetadataReferenceCache.cs (2)
20private ImmutableDictionary<string, ReferenceSet> _referenceSets 21= ImmutableDictionary<string, ReferenceSet>.Empty;
Workspace\ProjectSystem\IRuleSetFile.cs (1)
18ImmutableDictionary<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\Project.cs (8)
29private ImmutableDictionary<DocumentId, Document?> _idToDocumentMap = ImmutableDictionary<DocumentId, Document?>.Empty; 30private ImmutableDictionary<DocumentId, SourceGeneratedDocument> _idToSourceGeneratedDocumentMap = ImmutableDictionary<DocumentId, SourceGeneratedDocument>.Empty; 31private ImmutableDictionary<DocumentId, AdditionalDocument?> _idToAdditionalDocumentMap = ImmutableDictionary<DocumentId, AdditionalDocument?>.Empty; 32private ImmutableDictionary<DocumentId, AnalyzerConfigDocument?> _idToAnalyzerConfigDocumentMap = ImmutableDictionary<DocumentId, AnalyzerConfigDocument?>.Empty;
Workspace\Solution\ProjectDependencyGraph.cs (22)
34private readonly ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> _referencesMap; 44private ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? _lazyReverseReferencesMap; 55private ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> _transitiveReferencesMap; 56private ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> _reverseTransitiveReferencesMap; 67ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty, 68ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty, 74ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> referencesMap) 79transitiveReferencesMap: ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty, 80reverseTransitiveReferencesMap: ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Empty, 89ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> referencesMap, 90ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? reverseReferencesMap, 91ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> transitiveReferencesMap, 92ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> reverseTransitiveReferencesMap, 113private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> RemoveItemsWithEmptyValues( 114ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> map) 116ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>.Builder? builder = null; 210private ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeReverseReferencesMap() 251var currentMap = _transitiveReferencesMap; 303var currentMap = _reverseTransitiveReferencesMap; 467ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> referencesMap) 487ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> forwardReferencesMap, 488ImmutableDictionary<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)
24var referencesMap = ComputeNewReferencesMapForRemovedAllProjectReferences(_referencesMap, projectId); 25var reverseReferencesMap = ComputeNewReverseReferencesMapForRemovedAllProjectReferences(_lazyReverseReferencesMap, projectId, referencedProjectIds); 26var transitiveReferencesMap = ComputeNewTransitiveReferencesMapForRemovedAllProjectReferences(_transitiveReferencesMap, projectId, referencedProjectIds); 27var reverseTransitiveReferencesMap = ComputeNewReverseTransitiveReferencesMapForRemovedAllProjectReferences(_reverseTransitiveReferencesMap, projectId); 39private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReferencesMapForRemovedAllProjectReferences( 40ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingForwardReferencesMap, 57private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? ComputeNewReverseReferencesMapForRemovedAllProjectReferences( 58ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? existingReverseReferencesMap, 76private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewTransitiveReferencesMapForRemovedAllProjectReferences( 77ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingTransitiveReferencesMap, 103private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReverseTransitiveReferencesMapForRemovedAllProjectReferences( 104ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingReverseTransitiveReferencesMap,
Workspace\Solution\ProjectDependencyGraph_RemoveProject.cs (14)
19var referencesMap = ComputeNewReferencesMapForRemovedProject( 26var reverseReferencesMap = ComputeNewReverseReferencesMapForRemovedProject( 30var transitiveReferencesMap = ComputeNewTransitiveReferencesMapForRemovedProject(_transitiveReferencesMap, projectId); 31var reverseTransitiveReferencesMap = ComputeNewReverseTransitiveReferencesMapForRemovedProject(_reverseTransitiveReferencesMap, projectId); 51private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReferencesMapForRemovedProject( 52ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingForwardReferencesMap, 53ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? existingReverseReferencesMap, 90private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? ComputeNewReverseReferencesMapForRemovedProject( 91ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingForwardReferencesMap, 92ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? existingReverseReferencesMap, 125private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewTransitiveReferencesMapForRemovedProject( 126ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingTransitiveReferencesMap, 153private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReverseTransitiveReferencesMapForRemovedProject( 154ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingReverseTransitiveReferencesMap,
Workspace\Solution\ProjectDependencyGraph_RemoveProjectReference.cs (12)
22var referencesMap = ComputeNewReferencesMapForRemovedProjectReference(_referencesMap, projectId, referencedProjectId); 23var reverseReferencesMap = ComputeNewReverseReferencesMapForRemovedProjectReference(_lazyReverseReferencesMap, projectId, referencedProjectId); 24var transitiveReferencesMap = ComputeNewTransitiveReferencesMapForRemovedProjectReference(_transitiveReferencesMap, projectId, referencedProjectId); 25var reverseTransitiveReferencesMap = ComputeNewReverseTransitiveReferencesMapForRemovedProjectReference(_reverseTransitiveReferencesMap, projectId, referencedProjectId); 37private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReferencesMapForRemovedProjectReference( 38ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingForwardReferencesMap, 54private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? ComputeNewReverseReferencesMapForRemovedProjectReference( 55ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>>? existingReverseReferencesMap, 67private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewTransitiveReferencesMapForRemovedProjectReference( 68ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingTransitiveReferencesMap, 94private static ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> ComputeNewReverseTransitiveReferencesMapForRemovedProjectReference( 95ImmutableDictionary<ProjectId, ImmutableHashSet<ProjectId>> existingReverseTransitiveReferencesMap,
Workspace\Solution\Solution.cs (5)
32private ImmutableDictionary<ProjectId, Project> _projectIdToProjectMap; 49_projectIdToProjectMap = ImmutableDictionary<ProjectId, Project>.Empty; 63ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 509internal Solution WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options) 1703internal ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions => SolutionState.FallbackAnalyzerOptions;
Workspace\Solution\SolutionCompilationState.cs (2)
921/// <inheritdoc cref="SolutionState.WithFallbackAnalyzerOptions(ImmutableDictionary{string, StructuredAnalyzerConfigOptions})"/> 922public 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 (24)
48public ImmutableDictionary<string, StructuredAnalyzerConfigOptions> FallbackAnalyzerOptions { get; } = ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty; 54internal ImmutableDictionary<string, int> ProjectCountByLanguage { get; } = ImmutableDictionary<string, int>.Empty; 61private ImmutableDictionary<string, ImmutableArray<DocumentId>> _lazyFilePathToRelatedDocumentIds = ImmutableDictionary<string, ImmutableArray<DocumentId>>.Empty.WithComparers(FilePathComparer); 71ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions, 72ImmutableDictionary<string, int> projectCountByLanguage, 73ImmutableDictionary<ProjectId, ProjectState> idToProjectStateMap, 108ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 118projectCountByLanguage: ImmutableDictionary<string, int>.Empty, 119idToProjectStateMap: ImmutableDictionary<ProjectId, ProjectState>.Empty, 129public ImmutableDictionary<ProjectId, ProjectState> ProjectStates { get; } 166ImmutableDictionary<string, int>? projectCountByLanguage = null, 171ImmutableDictionary<string, StructuredAnalyzerConfigOptions>? fallbackAnalyzerOptions = null, 172ImmutableDictionary<ProjectId, ProjectState>? idToProjectStateMap = null, 389var newStateMap = newStateMapBuilder.ToImmutable(); 445var newStateMap = newStateMapBuilder.ToImmutable(); 481private static ImmutableDictionary<string, int> AddLanguageCounts(ImmutableDictionary<string, int> projectCountByLanguage, in TemporaryArray<(string language, int count)> languageCountDeltas) 901public SolutionState WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options) 1155var newStateMap = ProjectStates.SetItem(projectId, newProjectState); 1190ImmutableDictionary<ProjectId, ProjectState> projectStates) 1254var fileMap = _lazyFilePathToRelatedDocumentIds;
Workspace\Workspace.cs (4)
86_latestSolution = CreateSolution(info, emptyOptions, analyzerReferences: [], fallbackAnalyzerOptions: ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty); 127private Solution CreateSolution(SolutionInfo solutionInfo, SolutionOptionSet options, IReadOnlyList<AnalyzerReference> analyzerReferences, ImmutableDictionary<string, StructuredAnalyzerConfigOptions> fallbackAnalyzerOptions) 409var newFallbackOptions = newSolution.FallbackAnalyzerOptions; 978internal void OnSolutionFallbackAnalyzerOptionsChanged(ImmutableDictionary<string, StructuredAnalyzerConfigOptions> options)
Microsoft.CodeAnalysis.Workspaces.Desktop (2)
Workspace\Host\Mef\MefV1HostServices.cs (2)
35private ImmutableDictionary<ExportKey, IEnumerable> _exportsMap 36= ImmutableDictionary<ExportKey, IEnumerable>.Empty;
Microsoft.CodeAnalysis.Workspaces.MSBuild (14)
MSBuild\BuildHostProcessManager.cs (3)
24private readonly ImmutableDictionary<string, string> _globalMSBuildProperties; 32public BuildHostProcessManager(ImmutableDictionary<string, string>? globalMSBuildProperties = null, string? binaryLogPath = null, ILoggerFactory? loggerFactory = null) 34_globalMSBuildProperties = globalMSBuildProperties ?? ImmutableDictionary<string, string>.Empty;
MSBuild\MSBuildProjectLoader.cs (3)
38ImmutableDictionary<string, string>? properties) 60public MSBuildProjectLoader(Workspace workspace, ImmutableDictionary<string, string>? properties = null) 80public ImmutableDictionary<string, string> Properties { get; private set; }
MSBuild\MSBuildProjectLoader.Worker.cs (2)
42private readonly ImmutableDictionary<string, string> _globalProperties; 81ImmutableDictionary<string, string> globalProperties,
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (2)
49private readonly ImmutableDictionary<string, HashSet<int>> _pathToIndicesMap; 66private static ImmutableDictionary<string, HashSet<int>> CreatePathToIndexMap(ImmutableArray<MetadataReference> metadataReferences)
MSBuild\MSBuildWorkspace.cs (4)
39ImmutableDictionary<string, string> properties) 53return Create(ImmutableDictionary<string, string>.Empty); 72return Create(ImmutableDictionary<string, string>.Empty, hostServices); 100public ImmutableDictionary<string, string> Properties => _loader.Properties;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (30)
Build\ProjectBuildManager.cs (7)
27private static readonly ImmutableDictionary<string, string> s_defaultGlobalProperties = new Dictionary<string, string>() 59private readonly ImmutableDictionary<string, string> _additionalGlobalProperties; 72public ProjectBuildManager(ImmutableDictionary<string, string> additionalGlobalProperties, ILogger? msbuildLogger = null) 74_additionalGlobalProperties = additionalGlobalProperties ?? ImmutableDictionary<string, string>.Empty; 78private ImmutableDictionary<string, string> AllGlobalProperties 174globalProperties ??= ImmutableDictionary<string, string>.Empty; 175var allProperties = s_defaultGlobalProperties.RemoveRange(globalProperties.Keys).AddRange(globalProperties);
BuildHost.cs (2)
22private readonly ImmutableDictionary<string, string> _globalMSBuildProperties; 28public BuildHost(BuildHostLogger logger, ImmutableDictionary<string, string> globalMSBuildProperties, string? binaryLogPath, RpcServer server)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
157private static readonly ImmutableDictionary<string, string> s_debugTypeValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (2)
682public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 693public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
src\Compilers\Core\Portable\InternalUtilities\ImmutableSetWithInsertionOrder`1.cs (3)
17private readonly ImmutableDictionary<T, uint> _map; 20private ImmutableSetWithInsertionOrder(ImmutableDictionary<T, uint> map, uint nextElementValue) 49var modifiedMap = _map.Remove(value);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (3)
18/// best for <see cref="ImmutableDictionary{TKey, TValue}"/>.</para> 22/// <see cref="ImmutableDictionary{TKey, TValue}"/> is applicable in scenarios most like the scenarios where 32/// <description><see cref="ImmutableDictionary{TKey, TValue}"/> Complexity</description>
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\Dependencies\PooledObjects\PooledDictionary.cs (3)
24public ImmutableDictionary<K, V> ToImmutableDictionaryAndFree() 26var result = this.ToImmutableDictionary(this.Comparer); 31public ImmutableDictionary<K, V> ToImmutableDictionary() => this.ToImmutableDictionary(this.Comparer);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
BuildHostProcessManagerTests.cs (1)
107var globalMSBuildProperties = new Dictionary<string, string>
FileSet.cs (1)
21_fileMap = fileMap ?? ImmutableDictionary<string, object>.Empty;
VisualStudioMSBuildWorkspaceTests.cs (1)
3121await using var buildHostProcessManager = new BuildHostProcessManager(ImmutableDictionary<string, string>.Empty);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (10)
Fakes\TestOptionSet.cs (3)
14public static new readonly TestOptionSet Empty = new(ImmutableDictionary<OptionKey, object?>.Empty); 16private readonly ImmutableDictionary<OptionKey, object?> _values; 18public TestOptionSet(ImmutableDictionary<OptionKey, object?> values)
Options\OptionsTestInfo.cs (3)
16private static Tuple<string, ImmutableDictionary<string, OptionsTestInfo>>? s_cachedResult; 18public static ImmutableDictionary<string, OptionsTestInfo> CollectOptions(string directory) 82var result = resultBuilder.ToImmutable();
Remote\TestSerializerService.cs (2)
34private static readonly ImmutableDictionary<MetadataReference, string?> s_wellKnownReferenceNames = ImmutableDictionary.Create<MetadataReference, string?>(ReferenceEqualityComparer.Instance) 40private static readonly ImmutableDictionary<string, MetadataReference> s_wellKnownReferences = ImmutableDictionary.Create<string, MetadataReference>()
Workspaces\TestWorkspace_XmlConsumption.cs (2)
632ImmutableDictionary<string, ImmutableArray<TextSpan>> spans; 658spans = ImmutableDictionary<string, ImmutableArray<TextSpan>>.Empty;
Microsoft.CodeAnalysis.Workspaces.UnitTests (17)
Formatter\FormatterTests.cs (1)
85var options = passExplicitOptions ? new TestOptionSet(ImmutableDictionary<OptionKey, object?>.Empty.
Options\DocumentOptionSetTests.cs (6)
21var underlyingSet = new TestOptionSet(ImmutableDictionary<OptionKey, object?>.Empty.Add( 51var underlyingSet = new TestOptionSet(ImmutableDictionary<OptionKey, object?>.Empty.Add( 73var underlyingSet = new TestOptionSet(ImmutableDictionary<OptionKey, object?>.Empty); 90var underlyingSet = new TestOptionSet(ImmutableDictionary<OptionKey, object?>.Empty); 122var underlyingSet = new TestOptionSet(ImmutableDictionary<OptionKey, object?>.Empty 152var underlyingSet = new TestOptionSet(ImmutableDictionary<OptionKey, object?>.Empty);
SolutionTests\SolutionTests.cs (4)
2289var solution2 = solution.WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty 2290.Add(LanguageNames.CSharp, StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty 2296var solution3 = solution2.WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty 2297.Add(LanguageNames.CSharp, StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty
UtilityTest\ImmutableDictionaryExtensionsTests.cs (6)
16var empty = ImmutableDictionary<int, int>.Empty; 32var emptyOrdinal = ImmutableDictionary<string, int>.Empty.WithComparers(keyComparer: StringComparer.Ordinal); 33var emptyIgnoreCase = ImmutableDictionary<string, int>.Empty.WithComparers(keyComparer: StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.Build.Tasks.Feed (3)
src\model\SetupTargetFeedConfigV3.cs (3)
78public ImmutableDictionary<string, string> FeedOverrides { get; set; } 80public ImmutableDictionary<string, string> FeedSasUris { get; set; } 82public ImmutableDictionary<string, string> FeedKeys { get; set; }
Microsoft.DotNet.SignTool (4)
src\BatchSignInput.cs (2)
25internal ImmutableDictionary<SignedFileContentKey, ZipData> ZipDataMap; 33internal BatchSignInput(ImmutableArray<FileSignInfo> filesToSign, ImmutableDictionary<SignedFileContentKey, ZipData> zipDataMap, ImmutableArray<KeyValuePair<string, string>> filesToCopy)
src\ZipData.cs (2)
36internal ImmutableDictionary<string, ZipPart> NestedParts { get; } 38internal ZipData(FileSignInfo fileSignInfo, ImmutableDictionary<string, ZipPart> nestedBinaryParts)
Microsoft.Interop.ComInterfaceGenerator (34)
Analyzers\AddGeneratedComClassFixer.cs (7)
43protected override Func<DocumentEditor, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions) 48protected override string GetDiagnosticTitle(ImmutableDictionary<string, Option> selectedOptions) 57protected override ImmutableDictionary<string, Option> ParseOptionsFromDiagnostic(Diagnostic diagnostic) 59return ImmutableDictionary<string, Option>.Empty; 62protected override ImmutableDictionary<string, Option> CombineOptions(ImmutableDictionary<string, Option> fixAllOptions, ImmutableDictionary<string, Option> diagnosticOptions) => fixAllOptions;
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
136ImmutableDictionary<string, string>.Builder properties = ImmutableDictionary.CreateBuilder<string, string>();
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (7)
28protected override string GetDiagnosticTitle(ImmutableDictionary<string, Option> selectedOptions) 35protected override Func<DocumentEditor, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions) 43protected override ImmutableDictionary<string, Option> ParseOptionsFromDiagnostic(Diagnostic diagnostic) 58protected override ImmutableDictionary<string, Option> CombineOptions(ImmutableDictionary<string, Option> fixAllOptions, ImmutableDictionary<string, Option> diagnosticOptions) 60ImmutableDictionary<string, Option> combinedOptions = fixAllOptions;
ComInterfaceGenerator.cs (1)
347ImmutableDictionary<string, string>.Empty.Add(GeneratorDiagnosticProperties.AddMarshalAsAttribute, "Error"),
GeneratedComInterfaceAttributeData.cs (1)
64var args = attr.NamedArguments.ToImmutableDictionary();
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (16)
27protected virtual IEnumerable<ConvertToSourceGeneratedInteropFix> CreateAllFixesForDiagnosticOptions(SyntaxNode node, ImmutableDictionary<string, Option> options) 33protected abstract Func<DocumentEditor, 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) 130var options = ParseOptionsFromDiagnostic(diagnostic); 135var selectedOptions = fix.SelectedOptions.Add(Option.AllowUnsafe, new Option.Bool(true)); 164protected record struct ConvertToSourceGeneratedInteropFix(Func<DocumentEditor, CancellationToken, Task> ApplyFix, ImmutableDictionary<string, Option> SelectedOptions); 171var options = Option.ParseOptionsFromEquivalenceKey(fixAllContext.CodeActionEquivalenceKey);
VtableIndexStubGenerator.cs (1)
138var namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
Microsoft.Interop.LibraryImportGenerator (32)
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); 129protected override Func<DocumentEditor, 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);
LibraryImportGenerator.cs (1)
200ImmutableDictionary<string, TypedConstant> namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (16)
27protected virtual IEnumerable<ConvertToSourceGeneratedInteropFix> CreateAllFixesForDiagnosticOptions(SyntaxNode node, ImmutableDictionary<string, Option> options) 33protected abstract Func<DocumentEditor, 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) 130var options = ParseOptionsFromDiagnostic(diagnostic); 135var selectedOptions = fix.SelectedOptions.Add(Option.AllowUnsafe, new Option.Bool(true)); 164protected record struct ConvertToSourceGeneratedInteropFix(Func<DocumentEditor, CancellationToken, Task> ApplyFix, ImmutableDictionary<string, Option> SelectedOptions); 171var options = Option.ParseOptionsFromEquivalenceKey(fixAllContext.CodeActionEquivalenceKey);
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
142ImmutableDictionary<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)
135ImmutableDictionary<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)
143new 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.VisualStudio.LanguageServices (84)
CodeLens\CodeLensCallbackListener.cs (1)
59public async Task<ImmutableDictionary<Guid, string>> GetProjectVersionsAsync(ImmutableArray<Guid> projectGuids, CancellationToken cancellationToken)
ColorSchemes\ColorSchemeApplier.ClassificationVerifier.cs (11)
44private static ImmutableDictionary<string, uint> DarkThemeForeground 54private static ImmutableDictionary<string, uint> BlueLightThemeForeground 66private readonly ImmutableDictionary<ColorSchemeName, ImmutableDictionary<Guid, ImmutableDictionary<string, uint>>> _colorSchemes; 73ImmutableDictionary<ColorSchemeName, ColorScheme> colorSchemes) 99!_colorSchemes.TryGetValue(schemeName, out var colorScheme) || 100!colorScheme.TryGetValue(themeId, out var colorSchemeTheme)) 111var coreThemeColors = themeId == KnownColorThemes.Dark 151ImmutableDictionary<string, uint> coreThemeColors, 152ImmutableDictionary<string, uint> schemeThemeColors,
ColorSchemes\ColorSchemeApplier.cs (2)
40private readonly ImmutableDictionary<ColorSchemeName, ColorScheme> _colorSchemes; 45private ImmutableDictionary<ColorSchemeName, ImmutableArray<RegistryItem>>? _colorSchemeRegistryItems;
ColorSchemes\ColorSchemeApplier.Settings.cs (1)
41public static ImmutableDictionary<ColorSchemeName, ColorScheme> GetColorSchemes()
CommonControls\MemberSelectionViewModel.cs (3)
24private readonly ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> _symbolToDependentsMap; 25private readonly ImmutableDictionary<ISymbol, MemberSymbolViewModel> _symbolToMemberViewMap; 30ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> dependentsMap,
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
144ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> map)
ExtractClass\ExtractClassViewModel.cs (1)
26ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> memberToDependentsMap,
ExtractClass\VisualStudioExtractClassOptionsService.cs (1)
67var memberToDependentsMap = SymbolDependentsBuilder.FindMemberToDependentsMap(membersInType, document.Project, cancellationToken);
MoveStaticMembers\StaticMemberSelectionViewModel.cs (3)
18private readonly ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> _symbolToDependentsMap; 19private readonly ImmutableDictionary<ISymbol, SymbolViewModel<ISymbol>> _symbolToMemberViewMap; 24ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> dependentsMap)
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
113var memberToDependentsMap = SymbolDependentsBuilder.FindMemberToDependentsMap(membersInType, document.Project, cancellationTokenSource.Token);
Options\VisualStudioOptionPersisterProvider.cs (1)
31private readonly ImmutableDictionary<string, Lazy<IVisualStudioStorageReadFallback, OptionNameMetadata>> _readFallbacks;
Options\VisualStudioSettingsOptionPersister.cs (4)
28private readonly ImmutableDictionary<string, Lazy<IVisualStudioStorageReadFallback, OptionNameMetadata>> _readFallbacks; 34private ImmutableDictionary<string, (OptionKey2 primaryOptionKey, string primaryStorageKey)> _storageKeysToMonitorForChanges 35= ImmutableDictionary<string, (OptionKey2, string)>.Empty; 40public VisualStudioSettingsOptionPersister(Action<OptionKey2, object?> refreshOption, ImmutableDictionary<string, Lazy<IVisualStudioStorageReadFallback, OptionNameMetadata>> readFallbacks, ISettingsManager settingsManager)
Packaging\PackageInstallerService.ProjectState.cs (4)
14public static readonly ProjectState Disabled = new(isEnabled: false, ImmutableDictionary<string, string>.Empty); 18private readonly ImmutableDictionary<string, string> InstalledPackageToVersion; 20private ProjectState(bool isEnabled, ImmutableDictionary<string, string> installedPackageToVersion) 26public ProjectState(ImmutableDictionary<string, string> installedPackageToVersion)
Packaging\PackageInstallerServiceFactory.cs (4)
316var installedPackagesMap = await GetInstalledPackagesMapAsync(nugetService, projectGuid, cancellationToken).ConfigureAwait(false); 388var installedPackagesMap = await GetInstalledPackagesMapAsync(nugetService, projectGuid, cancellationToken).ConfigureAwait(false); 579var installedPackagesMap = await GetInstalledPackagesMapAsync(nugetService, projectGuid, cancellationToken).ConfigureAwait(false); 589private static async Task<ImmutableDictionary<string, string>> GetInstalledPackagesMapAsync(INuGetProjectService nugetService, Guid projectGuid, CancellationToken cancellationToken)
ProjectSystem\OpenTextBufferProvider.cs (2)
48private ImmutableDictionary<string, ITextBuffer> _monikerToTextBufferMap = ImmutableDictionary<string, ITextBuffer>.Empty.WithComparers(StringComparer.OrdinalIgnoreCase);
ProjectSystem\RuleSets\VisualStudioRuleSetManager.RuleSetFile.cs (3)
29private ImmutableDictionary<string, ReportDiagnostic> _specificDiagnosticOptions; 63_specificDiagnosticOptions = ImmutableDictionary<string, ReportDiagnostic>.Empty; 100public ImmutableDictionary<string, ReportDiagnostic> GetSpecificDiagnosticOptions()
ProjectSystem\VisualStudioWorkspaceImpl.cs (6)
84private ImmutableDictionary<ProjectId, IVsHierarchy?> _projectToHierarchyMap = ImmutableDictionary<ProjectId, IVsHierarchy?>.Empty; 85private ImmutableDictionary<ProjectId, Guid> _projectToGuidMap = ImmutableDictionary<ProjectId, Guid>.Empty; 93private ImmutableDictionary<ProjectId, Func<string?>> _projectToRuleSetFilePath = ImmutableDictionary<ProjectId, Func<string?>>.Empty;
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
207var projectToHierarchyMap = _workspace._projectToHierarchyMap;
PullMemberUp\MainDialog\PullMemberUpDialogViewModel.cs (2)
30private readonly ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> _symbolToDependentsMap; 37ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> dependentsMap)
PullMemberUp\SymbolDependentsBuilder.cs (1)
20public static ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> FindMemberToDependentsMap(
PullMemberUp\VisualStudioPullMemberUpService.cs (1)
63var memberToDependentsMap = SymbolDependentsBuilder.FindMemberToDependentsMap(membersInType, document.Project, cancellationTokenSource.Token);
Snippets\SnippetExpansionClient.cs (4)
554var snippet = CreateMethodCallSnippet(methodName, includeMethod: true, ImmutableArray<IParameterSymbol>.Empty, ImmutableDictionary<string, string>.Empty); 632private static XDocument CreateMethodCallSnippet(string methodName, bool includeMethod, ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string> parameterValues) 863var newArguments = _state._arguments; 1173public ImmutableDictionary<string, string> _arguments = ImmutableDictionary.Create<string, string>();
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (4)
196Dictionary<Project, ImmutableDictionary<string, Document>>? filePathToDocumentMap = null; 251if (!filePathToDocumentMap.TryGetValue(project, out var filePathMap)) 286properties: ImmutableDictionary<string, string?>.Empty, 300private static async Task<ImmutableDictionary<string, Document>> GetFilePathToDocumentMapAsync(Project project, CancellationToken cancellationToken)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (13)
241? ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty 422private static ImmutableDictionary<Document, ImmutableArray<Diagnostic>> GetDocumentDiagnosticsMappedToNewSolution(ImmutableDictionary<Document, ImmutableArray<Diagnostic>> documentDiagnosticsToFixMap, Solution newSolution, string language) 424ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Builder? builder = null; 438return builder != null ? builder.ToImmutable() : ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty; 441private static ImmutableDictionary<Project, ImmutableArray<Diagnostic>> GetProjectDiagnosticsMappedToNewSolution(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectDiagnosticsToFixMap, Solution newSolution, string language) 443ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Builder? projectDiagsBuilder = null; 457return projectDiagsBuilder != null ? projectDiagsBuilder.ToImmutable() : ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty; 466private async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken) 484return ImmutableDictionary<Document, ImmutableArray<Diagnostic>>.Empty; 558private async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken) 576return ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty;
Telemetry\Shared\AbstractAggregatingLog.cs (3)
31private ImmutableDictionary<string, (TAggregator aggregator, TelemetryEvent TelemetryEvent, object Lock)> _aggregations = ImmutableDictionary<string, (TAggregator, TelemetryEvent, object)>.Empty; 125_aggregations = ImmutableDictionary<string, (TAggregator, TelemetryEvent, object)>.Empty;
Telemetry\Shared\TelemetryLogProvider.cs (6)
23private ImmutableDictionary<FunctionId, VisualStudioTelemetryLog> _logs = ImmutableDictionary<FunctionId, VisualStudioTelemetryLog>.Empty; 28private ImmutableDictionary<FunctionId, AggregatingHistogramLog> _histogramLogs = ImmutableDictionary<FunctionId, AggregatingHistogramLog>.Empty; 33private ImmutableDictionary<FunctionId, AggregatingCounterLog> _counterLogs = ImmutableDictionary<FunctionId, AggregatingCounterLog>.Empty;
Microsoft.VisualStudio.LanguageServices.CodeLens (1)
ReferenceCodeLensProvider.cs (1)
105var projectVersions = await _lazyCodeLensCallbackService.Value.InvokeAsync<ImmutableDictionary<Guid, string>>(
Microsoft.VisualStudio.LanguageServices.DevKit (9)
src\VisualStudio\Core\Def\Telemetry\Shared\AbstractAggregatingLog.cs (3)
31private ImmutableDictionary<string, (TAggregator aggregator, TelemetryEvent TelemetryEvent, object Lock)> _aggregations = ImmutableDictionary<string, (TAggregator, TelemetryEvent, object)>.Empty; 125_aggregations = ImmutableDictionary<string, (TAggregator, TelemetryEvent, object)>.Empty;
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogProvider.cs (6)
23private ImmutableDictionary<FunctionId, VisualStudioTelemetryLog> _logs = ImmutableDictionary<FunctionId, VisualStudioTelemetryLog>.Empty; 28private ImmutableDictionary<FunctionId, AggregatingHistogramLog> _histogramLogs = ImmutableDictionary<FunctionId, AggregatingHistogramLog>.Empty; 33private ImmutableDictionary<FunctionId, AggregatingCounterLog> _counterLogs = ImmutableDictionary<FunctionId, AggregatingCounterLog>.Empty;
Microsoft.VisualStudio.LanguageServices.LiveShare (4)
Client\RemoteLanguageServiceWorkspace.cs (2)
58private ImmutableDictionary<string, DocumentId> _openedDocs = ImmutableDictionary<string, DocumentId>.Empty;
Client\RemoteLanguageServiceWorkspaceHost.cs (2)
37private ImmutableDictionary<string, ProjectId> _loadedProjects = ImmutableDictionary.Create<string, ProjectId>(StringComparer.OrdinalIgnoreCase); 38private ImmutableDictionary<string, ProjectInfo> _loadedProjectInfo = ImmutableDictionary.Create<string, ProjectInfo>(StringComparer.OrdinalIgnoreCase);
Microsoft.VisualStudio.LanguageServices.UnitTests (8)
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (3)
49ImmutableDictionary(Of String, ImmutableArray(Of DiagnosticAnalyzer)).Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer))) 95ImmutableDictionary(Of String, ImmutableArray(Of DiagnosticAnalyzer)).Empty.Add(LanguageNames.CSharp, ImmutableArray.Create(Of DiagnosticAnalyzer)(analyzer))) 179properties:=ImmutableDictionary(Of String, String).Empty,
ProjectSystemShim\ConvertedVisualBasicProjectOptionsTests.vb (2)
150Optional ruleSetSpecificOptions As ImmutableDictionary(Of String, ReportDiagnostic) = Nothing, 156ruleSetSpecificOptions = If(ruleSetSpecificOptions, ImmutableDictionary(Of String, ReportDiagnostic).Empty)
ProjectSystemShim\MockRuleSetFile.vb (3)
15Private ReadOnly _specificOptions As ImmutableDictionary(Of String, ReportDiagnostic) 17Public Sub New(generalOption As ReportDiagnostic, specificOptions As ImmutableDictionary(Of String, ReportDiagnostic)) 38Public Function GetSpecificDiagnosticOptions() As ImmutableDictionary(Of String, ReportDiagnostic) Implements IRuleSetFile.GetSpecificDiagnosticOptions
Microsoft.VisualStudio.LanguageServices.Xaml (2)
Features\InlineRename\XamlEditorInlineRenameService.cs (2)
35public Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(IInlineRenameInfo inlineRenameInfo, IInlineRenameLocationSet inlineRenameLocationSet, CancellationToken cancellationToken) 37return Task.FromResult(ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>.Empty);
MSBuild (9)
CopyOnWriteDictionary.cs (9)
37private static readonly ImmutableDictionary<string, V> NameComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(MSBuildNameIgnoreCaseComparer.Default); 44private static readonly ImmutableDictionary<string, V> OrdinalIgnoreCaseComparerDictionaryPrototype = ImmutableDictionary.Create<string, V>(StringComparer.OrdinalIgnoreCase); 52private ImmutableDictionary<string, V> _backing; 59_backing = ImmutableDictionary<string, V>.Empty; 80var b = GetInitialDictionary((IEqualityComparer<string>?)comparer); 85private static ImmutableDictionary<string, V> GetInitialDictionary(IEqualityComparer<string>? keyComparer) 236ImmutableDictionary<string, V> initial = _backing; 290ImmutableDictionary<string, V> initial = _backing; 386ImmutableDictionary<string, V> snapshot = _backing;
Mvc.Api.Analyzers.Test (1)
ApiConventionAnalyzerIntegrationTest.cs (1)
311var specificDiagnosticOptions = compilationOptions.SpecificDiagnosticOptions.Add(
Roslyn.Test.PdbUtilities (2)
Reader\MockSymUnmanagedReader.cs (2)
21private readonly ImmutableDictionary<int, MethodDebugInfoBytes> _methodDebugInfoMap; 23public MockSymUnmanagedReader(ImmutableDictionary<int, MethodDebugInfoBytes> methodDebugInfoMap)
Roslyn.VisualStudio.Next.UnitTests (17)
Options\VisualStudioOptionStorageTests.cs (6)
74var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 101var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 140var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 157var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 169var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location)); 191var infos = OptionsTestInfo.CollectOptions(Path.GetDirectoryName(typeof(VisualStudioOptionStorage).Assembly.Location));
Options\VisualStudioSettingsOptionPersisterTests.cs (2)
80private static readonly ImmutableDictionary<string, Lazy<IVisualStudioStorageReadFallback, OptionNameMetadata>> s_noFallbacks = 81ImmutableDictionary<string, Lazy<IVisualStudioStorageReadFallback, OptionNameMetadata>>.Empty;
Remote\SnapshotSerializationTests.cs (5)
427var reference = new AnalyzerFileReference(location, new MockShadowCopyAnalyzerAssemblyLoader(ImmutableDictionary<string, string>.Empty.Add(location, file.Path))); 448var reference = new AnalyzerFileReference(location, new MockShadowCopyAnalyzerAssemblyLoader(ImmutableDictionary<string, string>.Empty.Add(location, file.Path))); 701return new AnalyzerFileReference(original, new MockShadowCopyAnalyzerAssemblyLoader(ImmutableDictionary<string, string>.Empty.Add(original, shadow.Path))); 732private readonly ImmutableDictionary<string, string> _map; 734public MockShadowCopyAnalyzerAssemblyLoader(ImmutableDictionary<string, string> map)
Services\SolutionServiceTests.cs (4)
170return solution.WithFallbackAnalyzerOptions(ImmutableDictionary<string, StructuredAnalyzerConfigOptions>.Empty 171.Add(LanguageNames.CSharp, StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty 174.Add(LanguageNames.VisualBasic, StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty 177.Add(LanguageNames.FSharp, StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(ImmutableDictionary<string, string>.Empty
RunTests (6)
AssemblyScheduler.cs (2)
77var testHistory = await TestHistoryManager.GetTestHistoryAsync(_options, cancellationToken); 121ImmutableDictionary<string, TimeSpan> testHistory)
TestHistoryManager.cs (4)
29public static async Task<ImmutableDictionary<string, TimeSpan>> GetTestHistoryAsync(Options options, CancellationToken cancellationToken) 50return ImmutableDictionary<string, TimeSpan>.Empty; 66return ImmutableDictionary<string, TimeSpan>.Empty; 75return ImmutableDictionary<string, TimeSpan>.Empty;
SemanticSearch.BuildTask (1)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
71internal static int CombineValues<TKey, TValue>(ImmutableDictionary<TKey, TValue> values, int maxItemsToHash = int.MaxValue)
System.Collections.Immutable (111)
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 (29)
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); 75public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 77return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer).AddRange(items); 89public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 91return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(items); 100public static ImmutableDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>() where TKey : notnull 112public static ImmutableDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IEqualityComparer<TKey>? keyComparer) where TKey : notnull 125public static ImmutableDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 142public 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 148return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer) 157public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this ImmutableDictionary<TKey, TValue>.Builder builder) where TKey : notnull 175public 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 188public static ImmutableDictionary<TKey, TSource> ToImmutableDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) where TKey : notnull 202public static ImmutableDictionary<TKey, TSource> ToImmutableDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 217public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) where TKey : notnull 231public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 235if (source is ImmutableDictionary<TKey, TValue> existingDictionary) 240return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(source); 251public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 263public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source) where TKey : notnull
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (24)
11/// Contains the inner <see cref="ImmutableDictionary{TKey, TValue}.Builder"/> class. 21/// While <see cref="ImmutableDictionary{TKey, TValue}.AddRange(IEnumerable{KeyValuePair{TKey, TValue}})"/> 52private ImmutableDictionary<TKey, TValue>? _immutable; 65/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}.Builder"/> class. 68internal Builder(ImmutableDictionary<TKey, TValue> map) 97ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.AddRange(this, input); 422ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.Add(key, value, KeyCollisionBehavior.SetValue, this.Origin); 435ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.AddRange(items, this.Origin); 503public ImmutableDictionary<TKey, TValue> ToImmutable() 508return _immutable ??= ImmutableDictionary<TKey, TValue>.Wrap(_root, _comparers, _count); 525ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.Add(key, value, KeyCollisionBehavior.ThrowIfValueDifferent, this.Origin); 539return ImmutableDictionary<TKey, TValue>.ContainsKey(key, this.Origin); 543/// Determines whether the <see cref="ImmutableDictionary{TKey, TValue}"/> 547/// The value to locate in the <see cref="ImmutableDictionary{TKey, TValue}"/>. 551/// true if the <see cref="ImmutableDictionary{TKey, TValue}"/> contains 578ImmutableDictionary<TKey, TValue>.MutationResult result = ImmutableDictionary<TKey, TValue>.Remove(key, this.Origin); 593return ImmutableDictionary<TKey, TValue>.TryGetValue(key, this.Origin, out value!); 601return ImmutableDictionary<TKey, TValue>.TryGetKey(equalKey, this.Origin, out actualKey); 633return 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 (40)
23public static readonly ImmutableDictionary<TKey, TValue> Empty = new ImmutableDictionary<TKey, TValue>(); 46/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}"/> class. 62/// Initializes a new instance of the <see cref="ImmutableDictionary{TKey, TValue}"/> class. 123public ImmutableDictionary<TKey, TValue> Clear() 170foreach (KeyValuePair<int, ImmutableDictionary<TKey, TValue>.HashBucket> bucket in _root) 187foreach (KeyValuePair<int, ImmutableDictionary<TKey, TValue>.HashBucket> bucket in _root) 298public ImmutableDictionary<TKey, TValue> Add(TKey key, TValue value) 302ImmutableDictionary<TKey, TValue>.MutationResult result = Add(key, value, KeyCollisionBehavior.ThrowIfValueDifferent, this.Origin); 309public ImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 319public ImmutableDictionary<TKey, TValue> SetItem(TKey key, TValue value) 323ImmutableDictionary<TKey, TValue>.MutationResult result = Add(key, value, KeyCollisionBehavior.SetValue, this.Origin); 332public ImmutableDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 336ImmutableDictionary<TKey, TValue>.MutationResult result = AddRange(items, this.Origin, KeyCollisionBehavior.SetValue); 343public ImmutableDictionary<TKey, TValue> Remove(TKey key) 347ImmutableDictionary<TKey, TValue>.MutationResult result = Remove(key, this.Origin); 354public ImmutableDictionary<TKey, TValue> RemoveRange(IEnumerable<TKey> keys) 359SortedInt32KeyNode<ImmutableDictionary<TKey, TValue>.HashBucket> root = _root; 367ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Remove(key, _comparers.KeyOnlyComparer, out result); 425public ImmutableDictionary<TKey, TValue> WithComparers(IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) 441ImmutableDictionary<TKey, TValue>.Comparers comparers = _comparers.WithValueComparer(valueComparer); 448var set = new ImmutableDictionary<TKey, TValue>(comparers); 457public ImmutableDictionary<TKey, TValue> WithComparers(IEqualityComparer<TKey>? keyComparer) 463/// Determines whether the <see cref="ImmutableDictionary{TKey, TValue}"/> 467/// The value to locate in the <see cref="ImmutableDictionary{TKey, TValue}"/>. 471/// true if the <see cref="ImmutableDictionary{TKey, TValue}"/> contains 828private static ImmutableDictionary<TKey, TValue> EmptyWithComparers(Comparers comparers) 838/// Attempts to discover an <see cref="ImmutableDictionary{TKey, TValue}"/> instance beneath some enumerable sequence 842/// <param name="other">Receives the concrete <see cref="ImmutableDictionary{TKey, TValue}"/> typed value if one can be found.</param> 844private static bool TryCastToImmutableMap(IEnumerable<KeyValuePair<TKey, TValue>> sequence, [NotNullWhen(true)] out ImmutableDictionary<TKey, TValue>? other) 846other = sequence as ImmutableDictionary<TKey, TValue>; 937ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Add(key, value, origin.KeyOnlyComparer, origin.ValueComparer, behavior, out result); 943SortedInt32KeyNode<ImmutableDictionary<TKey, TValue>.HashBucket> newRoot = UpdateRoot(origin.Root, hashCode, newBucket, origin.HashBucketComparer); 955SortedInt32KeyNode<ImmutableDictionary<TKey, TValue>.HashBucket> newRoot = origin.Root; 962ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Add(pair.Key, pair.Value, origin.KeyOnlyComparer, origin.ValueComparer, collisionBehavior, out result); 983SortedInt32KeyNode<ImmutableDictionary<TKey, TValue>.HashBucket> newRoot = UpdateRoot(origin.Root, hashCode, bucket.Remove(key, origin.KeyOnlyComparer, out result), origin.HashBucketComparer); 1016private static ImmutableDictionary<TKey, TValue> Wrap(SortedInt32KeyNode<HashBucket> root, Comparers comparers, int count) 1030private ImmutableDictionary<TKey, TValue> Wrap(SortedInt32KeyNode<HashBucket>? root, int adjustedCountIfDifferentRoot) 1050private ImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs, bool avoidToHashMap) 1059if (TryCastToImmutableMap(pairs, out ImmutableDictionary<TKey, TValue>? other)) 1065ImmutableDictionary<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.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
112public INamedTypeSymbol? ImmutableDictionaryType => GetOrResolveType(typeof(ImmutableDictionary<,>), ref _ImmutableDictionaryType);
System.Windows.Forms.Analyzers.CSharp.Tests (16)
Analyzers\Verifiers\CSharpVerifierHelper.cs (3)
19internal static ImmutableDictionary<string, ReportDiagnostic> NullableWarnings { get; } = GetNullableWarningsFromCompiler(); 21private static ImmutableDictionary<string, ReportDiagnostic> GetNullableWarningsFromCompiler() 25var nullableWarnings = commandLineArguments.CompilationOptions.SpecificDiagnosticOptions;
CompilerAnalyzerConfigOptions.cs (2)
19private readonly ImmutableDictionary<string, string> _backing; 21public CompilerAnalyzerConfigOptions(ImmutableDictionary<string, string> properties)
CompilerAnalyzerConfigOptionsProvider.cs (4)
16private readonly ImmutableDictionary<object, AnalyzerConfigOptions> _treeDict; 20ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, 24ImmutableDictionary<object, AnalyzerConfigOptions> treeDict, 39internal CompilerAnalyzerConfigOptionsProvider WithAdditionalTreeOptions(ImmutableDictionary<object, AnalyzerConfigOptions> treeDict)
Generators\ProjectFileReaderTests.cs (7)
50CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 76CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 114CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 151CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 173CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 193CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions); 211CompilerAnalyzerConfigOptionsProvider provider = new(ImmutableDictionary<object, AnalyzerConfigOptions>.Empty, configOptions);
xunit.assert (2)
DictionaryAsserts.cs (2)
186 ImmutableDictionary<TKey, TValue> collection) 314 ImmutableDictionary<TKey, TValue> collection)