290 references to ImmutableDictionary
AnalyzerRunner (2)
CodeRefactoringRunner.cs (1)
133var builder = ImmutableDictionary.CreateBuilder<string, ImmutableHashSet<int>>();
DiagnosticAnalyzerRunner.cs (1)
320var projectDiagnosticBuilder = ImmutableDictionary.CreateBuilder<ProjectId, AnalysisResult>();
ILLink.RoslynAnalyzer (1)
DataFlow\LValueFlowCaptureProvider.cs (1)
65 lvalueFlowCaptureIdBuilder ??= ImmutableDictionary.CreateBuilder<CaptureId, FlowCaptureKind> ();
Microsoft.AspNetCore.App.Analyzers (4)
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
171var propertiesBuilder = ImmutableDictionary.CreateBuilder<string, string?>();
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
258var properties = ImmutableDictionary.CreateBuilder<string, string>();
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
97var propertiesBuilder = ImmutableDictionary.CreateBuilder<string, string?>();
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
137var properties = ImmutableDictionary.CreateBuilder<string, string>();
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\Converters\DictionaryAdapters\ImmutableDictionaryBufferAdapter.cs (1)
18public static ImmutableDictionary<TKey, TValue>.Builder CreateBuffer() => ImmutableDictionary.CreateBuilder<TKey, TValue>();
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
Binding\FormDataMapperTests.cs (2)
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, }); 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, });
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\Converters\DictionaryAdapters\ImmutableDictionaryBufferAdapter.cs (1)
18public static ImmutableDictionary<TKey, TValue>.Builder CreateBuffer() => ImmutableDictionary.CreateBuilder<TKey, TValue>();
Microsoft.Build (9)
BuildCheck\Infrastructure\EditorConfig\EditorConfigFile.cs (2)
77var activeSectionProperties = ImmutableDictionary.CreateBuilder<string, string>(StringComparer.OrdinalIgnoreCase); 102activeSectionProperties = ImmutableDictionary.CreateBuilder<string, string>();
Collections\CopyOnWritePropertyDictionary.cs (1)
42private static readonly ImmutableDictionary<string, T> NameComparerDictionaryPrototype = ImmutableDictionary.Create<string, T>(MSBuildNameIgnoreCaseComparer.Default);
CopyOnWriteDictionary.cs (3)
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); 94: ImmutableDictionary.Create<string, V>(keyComparer);
Evaluation\LazyItemEvaluator.cs (2)
462private static readonly ImmutableDictionary<string, LazyItemList> s_emptyIgnoreCase = ImmutableDictionary.Create<string, LazyItemList>(StringComparer.OrdinalIgnoreCase); 469ImmutableDictionary.CreateBuilder<string, LazyItemList>() :
Graph\GraphBuilder.cs (1)
265ImmutableDictionary<string, string>.Builder solutionGlobalPropertiesBuilder = ImmutableDictionary.CreateBuilder(
Microsoft.Build.Tasks.Core (3)
CopyOnWriteDictionary.cs (3)
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); 94: ImmutableDictionary.Create<string, V>(keyComparer);
Microsoft.Build.Utilities.Core (3)
CopyOnWriteDictionary.cs (3)
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); 94: ImmutableDictionary.Create<string, V>(keyComparer);
Microsoft.CodeAnalysis (37)
CommandLine\AnalyzerConfig.cs (2)
203var activeSectionProperties = ImmutableDictionary.CreateBuilder<string, string>( 230activeSectionProperties = ImmutableDictionary.CreateBuilder<string, string>(
CommandLine\AnalyzerConfigSet.cs (6)
55new ObjectPool<TreeOptions.Builder>(() => ImmutableDictionary.CreateBuilder<string, ReportDiagnostic>(Section.PropertiesKeyComparer)); 58new ObjectPool<AnalyzerOptions.Builder>(() => ImmutableDictionary.CreateBuilder<string, string>(Section.PropertiesKeyComparer)); 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); 568sectionDict = ImmutableDictionary.CreateBuilder<string, (string, string, int)>(Section.PropertiesKeyComparer); 608duplicateDict = ImmutableDictionary.CreateBuilder<string, (int, ArrayBuilder<string>)>(Section.PropertiesKeyComparer);
CommandLine\CommandLineParser.cs (1)
1398var builder = ImmutableDictionary.CreateBuilder<string, string>();
CommandLine\CommonCompiler.cs (1)
1022var builder = ImmutableDictionary.CreateBuilder<object, AnalyzerConfigOptions>();
Compilation\SyntaxTreeOptionsProvider.cs (1)
60var builder = ImmutableDictionary.CreateBuilder<SyntaxTree, Options>();
DiagnosticAnalyzer\AnalysisResultBuilder.cs (5)
70var builder = ImmutableDictionary.CreateBuilder<string, OneOrMany<AdditionalText>>(PathUtilities.Comparer); 534var builder = ImmutableDictionary.CreateBuilder<TKey, ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>>(); 535var perTreeBuilder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>(); 569var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>(); 588var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, AnalyzerTelemetryInfo>();
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1168var mapBuilder = ImmutableDictionary.CreateBuilder<Diagnostic, ProgrammaticSuppressionInfo>();
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (1)
839var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, AnalyzerActionCounts>();
DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer);
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
285var builder = ImmutableDictionary.CreateBuilder<string, SuppressMessageInfo>();
Emit\CommonPEModuleBuilder.cs (1)
985var builder = ImmutableDictionary.CreateBuilder<ISymbolInternal, ImmutableArray<ISymbolInternal>>();
InternalUtilities\EnumerableExtensions.cs (4)
715return ImmutableDictionary.Create<K, V>(); 718return ImmutableDictionary.CreateRange(items); 726return ImmutableDictionary.Create<K, V>(keyComparer); 729return ImmutableDictionary.CreateRange(keyComparer, items);
InternalUtilities\ImmutableSetWithInsertionOrder`1.cs (1)
15public static readonly ImmutableSetWithInsertionOrder<T> Empty = new ImmutableSetWithInsertionOrder<T>(ImmutableDictionary.Create<T, uint>(), 0u);
Operations\ControlFlowGraphBuilder.cs (2)
150var localFunctionsMap = ImmutableDictionary.CreateBuilder<IMethodSymbol, (ControlFlowRegion, ILocalFunctionOperation, int)>(); 155anonymousFunctionsMapOpt = ImmutableDictionary.CreateBuilder<IFlowAnonymousFunctionOperation, (ControlFlowRegion, int)>();
ReferenceManager\CommonReferenceManager.State.cs (1)
557lazyBuilder = lazyBuilder ?? ImmutableDictionary.CreateBuilder<AssemblyIdentity, AssemblyIdentity>();
RuleSet\RuleSetProcessor.cs (1)
98var specificOptions = ImmutableDictionary.CreateBuilder<string, ReportDiagnostic>();
SourceGeneration\IncrementalContexts.cs (1)
262HostOutputBuilder = ImmutableDictionary.CreateBuilder<string, object>();
SourceGeneration\Nodes\GeneratorRunStateTable.cs (1)
64ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Builder resultBuilder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<IncrementalGeneratorRunStep>>();
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>();
Syntax\AbstractWarningStateMap.cs (2)
79this.SpecificWarningOption = ImmutableDictionary.Create<string, TWarningState>(); 86this.SpecificWarningOption = specific ?? ImmutableDictionary.Create<string, TWarningState>();
Syntax\SyntaxTree.cs (1)
28ImmutableDictionary.Create<string, ReportDiagnostic>(CaseInsensitiveComparison.Comparer);
Microsoft.CodeAnalysis.CodeStyle (28)
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
164var builder = ImmutableDictionary.CreateBuilder<string, string?>();
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
94var properties = ImmutableDictionary.CreateBuilder<string, string?>();
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
28var builder = ImmutableDictionary.CreateBuilder<string, TargetScope>(StringComparer.OrdinalIgnoreCase);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
151var builder = ImmutableDictionary.CreateBuilder<(UnusedValuePreference preference, bool isUnusedLocalAssignment, bool isRemovableAssignment), 171var propertiesBuilder = ImmutableDictionary.CreateBuilder<string, string>();
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
164var builder = ImmutableDictionary.CreateBuilder<string, string?>();
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
164properties: ImmutableDictionary.Create<string, string?>() 184properties: ImmutableDictionary.Create<string, string?>()
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (2)
24var binaryToAssignmentBuilder = ImmutableDictionary.CreateBuilder<TSyntaxKind, TSyntaxKind>(); 25var assignmentToTokenBuilder = ImmutableDictionary.CreateBuilder<TSyntaxKind, TSyntaxKind>();
src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer);
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (4)
715return ImmutableDictionary.Create<K, V>(); 718return ImmutableDictionary.CreateRange(items); 726return ImmutableDictionary.Create<K, V>(keyComparer); 729return ImmutableDictionary.CreateRange(keyComparer, items);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigParser.cs (2)
48var activeSectionValues = ImmutableDictionary.CreateBuilder<string, string>(AnalyzerConfigOptions.KeyComparer); 49var activeSectionLines = ImmutableDictionary.CreateBuilder<string, TextLine>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (1)
60lvalueFlowCaptureIdBuilder ??= ImmutableDictionary.CreateBuilder<CaptureId, FlowCaptureKind>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
124var builder = ImmutableDictionary.CreateBuilder<Guid, string>(); 172var builder = ImmutableDictionary.CreateBuilder<NamingRule, string>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
59var builder = ImmutableDictionary.CreateBuilder<INamespaceOrTypeSymbol, IAliasSymbol>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (6)
18new BidirectionalMap<TKey, TValue>(ImmutableDictionary.Create<TKey, TValue>(), ImmutableDictionary.Create<TValue, TKey>()); 24: this(forwardMap: ImmutableDictionary.CreateRange(keyComparer, pairs), 25backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePairUtil.Create(p.Value, p.Key)))) 30: this(forwardMap: ImmutableDictionary.CreateRange(keyComparer, pairs.Select(static p => KeyValuePairUtil.Create(p.key, p.value))), 31backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePairUtil.Create(p.value, p.key))))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
46var result = ImmutableDictionary.CreateBuilder<K, ImmutableArray<V>>();
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (3)
149var parameterToExistingMemberMap = ImmutableDictionary.CreateBuilder<string, ISymbol>(); 150var parameterToNewFieldMap = ImmutableDictionary.CreateBuilder<string, string>(); 151var parameterToNewPropertyMap = ImmutableDictionary.CreateBuilder<string, string>();
Microsoft.CodeAnalysis.CSharp (11)
Binder\DecisionDagBuilder.cs (1)
841var newRemainingValues = ImmutableDictionary.CreateBuilder<BoundDagTemp, IValueSet>();
Binder\Imports.cs (1)
73var expandedAliasesBuilder = ImmutableDictionary.CreateBuilder<string, AliasAndUsingDirective>();
FlowAnalysis\NullableWalker.cs (3)
1573var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1630var analyzedNullabilities = ImmutableDictionary.CreateBuilder<BoundExpression, (NullabilityInfo, TypeSymbol?)>(EqualityComparer<BoundExpression>.Default, NullabilityInfoTypeComparer.Instance); 1671var remappedSymbolsBuilder = ImmutableDictionary.CreateBuilder<Symbol, Symbol>(Symbols.SymbolEqualityComparer.ConsiderEverything, Symbols.SymbolEqualityComparer.ConsiderEverything);
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
148private readonly ImmutableDictionary<(BoundNode?, Symbol), Symbol>.Builder _updatedSymbolMap = ImmutableDictionary.CreateBuilder<(BoundNode?, Symbol), Symbol>(ExpressionAndSymbolEqualityComparer.Instance, Symbols.SymbolEqualityComparer.ConsiderEverything);
FlowAnalysis\NullableWalker.Variables.cs (1)
211ImmutableDictionary.CreateRange(_variableTypes));
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
213var builder = ImmutableDictionary.CreateBuilder<INamespaceOrTypeSymbol, IAliasSymbol>();
Symbols\TypeSymbol.cs (1)
2326var map = ImmutableDictionary.CreateBuilder<MethodSymbol, MethodSymbol>(ExplicitInterfaceImplementationTargetMemberEqualityComparer.Instance);
Syntax\CSharpPragmaWarningStateMap.cs (2)
86var accumulatedSpecificWarningState = ImmutableDictionary.Create<string, PragmaWarningState>(); 113accumulatedSpecificWarningState = ImmutableDictionary.Create<string, PragmaWarningState>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
InlineRename\CSharpEditorInlineRenameService.cs (1)
92var contextBuilder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<(string filePath, string content)>>();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1501var analyzerConfigOptionsPerTreeBuilder = ImmutableDictionary.CreateBuilder<object, AnalyzerConfigOptions>();
Microsoft.CodeAnalysis.CSharp.Features (2)
Structure\CSharpBlockStructureProvider.cs (2)
18var builder = ImmutableDictionary.CreateBuilder<Type, ImmutableArray<AbstractSyntaxStructureProvider>>(); 62var builder = ImmutableDictionary.CreateBuilder<int, ImmutableArray<AbstractSyntaxStructureProvider>>();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
319ImmutableDictionary.CreateRange(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxTreeTests.cs (1)
231var map = ImmutableDictionary.CreateRange(
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
2394internal static ImmutableDictionary<string, ReportDiagnostic> ReportStructInitializationWarnings { get; } = ImmutableDictionary.CreateRange(
Microsoft.CodeAnalysis.EditorFeatures (2)
IntelliSense\AsyncCompletion\FilterSet.cs (1)
68var mapBuilder = ImmutableDictionary.CreateBuilder<string, FilterWithMask>();
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (1)
479var newTagTrees = ImmutableDictionary.CreateBuilder<ITextBuffer, TagSpanIntervalTree<TTag>>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
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>())
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
InlineRename\UI\SmartRename\SmartRenameViewModel.cs (1)
235smartRenameContext = ImmutableDictionary.CreateRange<string, ImmutableArray<(string filePath, string content)>>(
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (6)
PDB\MethodDebugInfo.Native.cs (4)
418constantBuilder ??= ImmutableDictionary.CreateBuilder<string, ImmutableArray<bool>>(); 423localBuilder ??= ImmutableDictionary.CreateBuilder<int, ImmutableArray<bool>>(); 494constantBuilder ??= ImmutableDictionary.CreateBuilder<LocalNameAndScope, ImmutableArray<string?>>(); 500localBuilder ??= ImmutableDictionary.CreateBuilder<int, ImmutableArray<string?>>();
PDB\MethodDebugInfo.Portable.cs (2)
187lazyDynamicLocalsBuilder ??= ImmutableDictionary.CreateBuilder<int, ImmutableArray<bool>>(); 194lazyTupleLocalsBuilder ??= ImmutableDictionary.CreateBuilder<int, ImmutableArray<string?>>();
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (2)
SpecialTypeExtensions.cs (1)
25var builder = ImmutableDictionary.CreateBuilder<SpecialType, QualifiedTypeSignature>();
VisualBasic\SyntaxKind.cs (1)
42var builder = ImmutableDictionary.CreateBuilder<string, SyntaxKind>(comparer);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
VS\IFSharpWorkspaceProjectContextFactory.cs (2)
108_projectReferences = ImmutableDictionary.Create<string, IFSharpWorkspaceProjectContext>(StringComparer.OrdinalIgnoreCase); 150var builder = ImmutableDictionary.CreateBuilder<string, IFSharpWorkspaceProjectContext>();
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Options\OmniSharpSolutionAnalyzerConfigOptionsUpdater.cs (1)
28var builder = ImmutableDictionary.CreateBuilder<string, string>(AnalyzerConfigOptions.KeyComparer);
Microsoft.CodeAnalysis.Features (29)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (2)
154var diagnosticsMapBuilder = ImmutableDictionary.CreateBuilder<ISymbol, List<Diagnostic>>(); 175var diagnosticsMapBuilder = ImmutableDictionary.CreateBuilder<ISymbol, List<Diagnostic>>();
CodeRefactorings\CodeRefactoringService.cs (1)
34ImmutableDictionary.CreateRange(
Completion\CompletionService.ProviderManager.cs (1)
51var builder = ImmutableDictionary.CreateBuilder<string, CompletionProvider>();
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
329var builder = ImmutableDictionary.CreateBuilder<IPropertySymbol, string>();
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
1453var additionalReverseMap = ImmutableDictionary.CreateBuilder<SyntaxNode, SyntaxNode>();
EditAndContinue\DebuggingSession.cs (1)
399var builder = ImmutableDictionary.CreateBuilder<K, ImmutableArray<V>>();
EmbeddedLanguages\RegularExpressions\RegexParser.CaptureInfoAnalyzer.cs (2)
41_captureNumberToSpan = ImmutableDictionary.CreateBuilder<int, TextSpan>(); 42_captureNameToSpan = ImmutableDictionary.CreateBuilder<string, TextSpan>();
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.FieldDelegatingCodeAction.cs (1)
40var parameterToExistingFieldMap = ImmutableDictionary.CreateBuilder<string, ISymbol>();
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (2)
195var parameterToExistingFieldMap = ImmutableDictionary.CreateBuilder<string, ISymbol>(); 196var parameterToNewFieldMap = ImmutableDictionary.CreateBuilder<string, string>();
PullMemberUp\MembersPuller.cs (1)
473var symbolToDeclarationsBuilder = ImmutableDictionary.CreateBuilder<ISymbol, ImmutableArray<SyntaxNode>>();
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
117var definitionToBackingField = ImmutableDictionary.CreateBuilder<IPropertySymbol, IFieldSymbol?>(SymbolEquivalenceComparer.Instance);
SimplifyThisOrMe\AbstractSimplifyThisOrMeDiagnosticAnalyzer.cs (1)
68var builder = ImmutableDictionary.CreateBuilder<string, string?>();
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
164var builder = ImmutableDictionary.CreateBuilder<string, string?>();
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
94var properties = ImmutableDictionary.CreateBuilder<string, string?>();
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
28var builder = ImmutableDictionary.CreateBuilder<string, TargetScope>(StringComparer.OrdinalIgnoreCase);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
151var builder = ImmutableDictionary.CreateBuilder<(UnusedValuePreference preference, bool isUnusedLocalAssignment, bool isRemovableAssignment), 171var propertiesBuilder = ImmutableDictionary.CreateBuilder<string, string>();
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
164var builder = ImmutableDictionary.CreateBuilder<string, string?>();
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
164properties: ImmutableDictionary.Create<string, string?>() 184properties: ImmutableDictionary.Create<string, string?>()
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (2)
24var binaryToAssignmentBuilder = ImmutableDictionary.CreateBuilder<TSyntaxKind, TSyntaxKind>(); 25var assignmentToTokenBuilder = ImmutableDictionary.CreateBuilder<TSyntaxKind, TSyntaxKind>();
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (3)
149var parameterToExistingMemberMap = ImmutableDictionary.CreateBuilder<string, ISymbol>(); 150var parameterToNewFieldMap = ImmutableDictionary.CreateBuilder<string, string>(); 151var parameterToNewPropertyMap = ImmutableDictionary.CreateBuilder<string, string>();
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
64var builder = ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>();
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\ActiveStatementsMapTests.cs (1)
243var remapping = ImmutableDictionary.CreateBuilder<ManagedMethodId, ImmutableArray<NonRemappableRegion>>();
Microsoft.CodeAnalysis.LanguageServer.Protocol (11)
Features\CodeFixes\CodeFixService.cs (4)
870var fixerMap = ImmutableDictionary.Create<LanguageKind, Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>>(); 910var configurationFixerMap = ImmutableDictionary.CreateBuilder<LanguageKind, Lazy<ImmutableArray<IConfigurationFixProvider>>>(); 932var languageMap = ImmutableDictionary.CreateBuilder<LanguageKind, Lazy<ImmutableDictionary<CodeFixProvider, int>>>(); 937var priorityMap = ImmutableDictionary.CreateBuilder<CodeFixProvider, int>();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.AnalysisData.cs (1)
116var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, DiagnosticAnalysisResult>();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (1)
310lazyLoadDiagnostics ??= ImmutableDictionary.CreateBuilder<DocumentId, ImmutableArray<DiagnosticData>>();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (1)
490locals ??= ImmutableDictionary.CreateBuilder<DocumentId, ImmutableArray<DiagnosticData>>();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (1)
139var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, StateSet>();
Features\Options\ClientFallbackAnalyzerConfigOptionsProvider.cs (1)
27var builder = ImmutableDictionary.CreateBuilder<string, string>(AnalyzerConfigOptions.KeyComparer);
Features\Options\SolutionAnalyzerConfigOptionsUpdater.cs (1)
75lazyBuilder = ImmutableDictionary.CreateBuilder<string, string>(AnalyzerConfigOptions.KeyComparer);
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
71var map = ImmutableDictionary.CreateBuilder<CodeFixGroupKey, IList<IUnifiedSuggestedAction>>();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
42var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<DiagnosticAnalyzer>>();
Diagnostics\BuildOnlyDiagnosticIdsHandlerTests.cs (1)
52var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<DiagnosticAnalyzer>>();
Microsoft.CodeAnalysis.Scripting (1)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
211var set = ImmutableDictionary.CreateBuilder<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.Test.Utilities (4)
Diagnostics\DiagnosticExtensions.cs (2)
403var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<DiagnosticAnalyzer>>(); 417var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<AnalyzerReference>>();
TestHelpers.cs (2)
29=> ImmutableDictionary.CreateRange(comparer, entries.Select(KeyValuePair.ToKeyValuePair)); 32=> ImmutableDictionary.CreateRange(entries.Select(KeyValuePair.ToKeyValuePair));
Microsoft.CodeAnalysis.VisualBasic (15)
Binding\LocalBinderBuilder.vb (2)
36_nodeMap = ImmutableDictionary.Create(Of SyntaxNode, BlockBaseBinder)() 37_listMap = ImmutableDictionary.Create(Of SyntaxList(Of StatementSyntax), BlockBaseBinder)()
CommandLine\VisualBasicCommandLineParser.vb (2)
1795Dim result = ImmutableDictionary.CreateBuilder(Of String, InternalSyntax.CConst)(CaseInsensitiveComparison.Comparer) 1817Dim result = ImmutableDictionary.CreateBuilder(Of String, Object)(CaseInsensitiveComparison.Comparer)
Compilation\VisualBasicCompilation.vb (6)
386Dim declMap = ImmutableDictionary.Create(Of SyntaxTree, DeclarationTableEntry)() 394ImmutableDictionary.Create(Of SyntaxTree, Integer)(), 636declMap = ImmutableDictionary.Create(Of SyntaxTree, DeclarationTableEntry)() 1032Dim ordinalMap = ImmutableDictionary.Create(Of SyntaxTree, Integer)() 1065ImmutableDictionary.Create(Of SyntaxTree, Integer)(), 1066ImmutableDictionary.Create(Of SyntaxTree, DeclarationTableEntry)(),
Compilation\VisualBasicDiagnosticFilter.vb (1)
38ImmutableDictionary.Create(Of String, ReportDiagnostic)(CaseInsensitiveComparison.Comparer).AddRange(specificDiagnosticOptions)
Scanner\Scanner.vb (1)
155Dim result = ImmutableDictionary.CreateBuilder(Of String, CConst)(IdentifierComparison.Comparer)
Syntax\VisualBasicSyntaxTree.ConditionalSymbolsMap.vb (1)
80Return If(Me._conditionalsMap.Any(), ImmutableDictionary.CreateRange(IdentifierComparison.Comparer, Me._conditionalsMap), Nothing)
Syntax\VisualBasicWarningStateMap.vb (2)
56Dim accumulatedSpecificWarningState = ImmutableDictionary.Create(Of String, ReportDiagnostic)(CaseInsensitiveComparison.Comparer) 77accumulatedSpecificWarningState = ImmutableDictionary.Create(Of String, ReportDiagnostic)(CaseInsensitiveComparison.Comparer)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Structure\VisualBasicBlockStructureProvider.vb (2)
14Dim builder = ImmutableDictionary.CreateBuilder(Of Type, ImmutableArray(Of AbstractSyntaxStructureProvider))() 61Dim builder = ImmutableDictionary.CreateBuilder(Of Integer, ImmutableArray(Of AbstractSyntaxStructureProvider))()
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
484ImmutableDictionary.CreateRange(
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
PreprocessorEETests.vb (1)
194Dim table = ImmutableDictionary.Create(Of String, CConst)(StringComparer.InvariantCultureIgnoreCase).Add("X", res)
Microsoft.CodeAnalysis.Workspaces (44)
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (2)
82return ImmutableDictionary.CreateRange([KeyValuePairUtil.Create(project, diagnostics)]); 94var projectsAndDiagnostics = ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>();
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (1)
131var builder = ImmutableDictionary.CreateBuilder<Document, ImmutableArray<Diagnostic>>();
Diagnostics\AbstractDiagnosticPropertiesService.cs (1)
29var result = ImmutableDictionary.CreateBuilder<string, string>();
Diagnostics\DiagnosticData.cs (1)
207additionalProperties ??= ImmutableDictionary.Create<string, string?>();
Diagnostics\Extensions.cs (1)
127var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>();
Diagnostics\HostDiagnosticAnalyzers.cs (5)
96var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<DiagnosticDescriptor>>(); 163var builder = ImmutableDictionary.CreateBuilder<object, ImmutableArray<DiagnosticDescriptor>>(); 184var builder = ImmutableDictionary.CreateBuilder<object, ImmutableArray<DiagnosticAnalyzer>>(); 222var builder = ImmutableDictionary.CreateBuilder<object, ImmutableArray<DiagnosticAnalyzer>>(); 262var builder = ImmutableDictionary.CreateBuilder<object, AnalyzerReference>();
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex.ExtensionMethodInfo.cs (1)
61var receiverTypeNameToExtensionMethodMapBuilder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<int>>();
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (2)
40return ImmutableDictionary.CreateRange([KeyValuePairUtil.Create(document, ImmutableArray.Create(decl.FullSpan))]); 66return ImmutableDictionary.CreateRange([KeyValuePairUtil.Create(document, ImmutableArray.Create(decl.FullSpan))]);
Options\GlobalOptionService.cs (2)
34private ImmutableDictionary<OptionKey2, object?> _currentValues = ImmutableDictionary.Create<OptionKey2, object?>(); 291_instance._currentValues = ImmutableDictionary.Create<OptionKey2, object?>();
Options\LegacyWorkspaceOptionService.cs (1)
37private ImmutableDictionary<OptionKey, object?> _currentExternallyDefinedOptionValues = ImmutableDictionary.Create<OptionKey, object?>();
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
226var builder = ImmutableDictionary.CreateBuilder<DocumentId, ImmutableArray<(TextSpan oldSpan, TextSpan newSpan)>>(); 236var builder = ImmutableDictionary.CreateBuilder<DocumentId, ImmutableArray<ComplexifiedSpan>>();
Rename\ConflictResolution.cs (1)
105var result = ImmutableDictionary.CreateBuilder<TextSpan, TextSpan>();
SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (1)
149var builder = ImmutableDictionary.CreateBuilder<DocumentId, SemanticModelReuseInfo?>();
Serialization\SerializerService.cs (4)
167var csOptions = ImmutableDictionary.GetValueOrDefault(optionsByLanguage, LanguageNames.CSharp); 168var vbOptions = ImmutableDictionary.GetValueOrDefault(optionsByLanguage, LanguageNames.VisualBasic); 208var optionsByLanguage = ImmutableDictionary.CreateBuilder<string, StructuredAnalyzerConfigOptions>(); 209var options = ImmutableDictionary.CreateBuilder<string, string>();
Shared\Extensions\ILanguageMetadataExtensions.cs (1)
32var builder = ImmutableDictionary.CreateBuilder<string, ArrayBuilder<Lazy<TInterface, TMetadata>>>();
src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
13internal static readonly ImmutableDictionary<string, string> EmptyDictionary = ImmutableDictionary.Create<string, string>(KeyComparer);
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (4)
715return ImmutableDictionary.Create<K, V>(); 718return ImmutableDictionary.CreateRange(items); 726return ImmutableDictionary.Create<K, V>(keyComparer); 729return ImmutableDictionary.CreateRange(keyComparer, items);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigParser.cs (2)
48var activeSectionValues = ImmutableDictionary.CreateBuilder<string, string>(AnalyzerConfigOptions.KeyComparer); 49var activeSectionLines = ImmutableDictionary.CreateBuilder<string, TextLine>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (1)
60lvalueFlowCaptureIdBuilder ??= ImmutableDictionary.CreateBuilder<CaptureId, FlowCaptureKind>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
124var builder = ImmutableDictionary.CreateBuilder<Guid, string>(); 172var builder = ImmutableDictionary.CreateBuilder<NamingRule, string>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
59var builder = ImmutableDictionary.CreateBuilder<INamespaceOrTypeSymbol, IAliasSymbol>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (6)
18new BidirectionalMap<TKey, TValue>(ImmutableDictionary.Create<TKey, TValue>(), ImmutableDictionary.Create<TValue, TKey>()); 24: this(forwardMap: ImmutableDictionary.CreateRange(keyComparer, pairs), 25backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePairUtil.Create(p.Value, p.Key)))) 30: this(forwardMap: ImmutableDictionary.CreateRange(keyComparer, pairs.Select(static p => KeyValuePairUtil.Create(p.key, p.value))), 31backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePairUtil.Create(p.value, p.key))))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
46var result = ImmutableDictionary.CreateBuilder<K, ImmutableArray<V>>();
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\MSBuildProjectLoader.cs (2)
46Properties = ImmutableDictionary.Create<string, string>(StringComparer.OrdinalIgnoreCase); 68Properties = ImmutableDictionary.Create<string, string>(StringComparer.OrdinalIgnoreCase);
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (1)
68var builder = ImmutableDictionary.CreateBuilder<string, HashSet<int>>(PathUtilities.Comparer);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (6)
Program.cs (1)
30var propertiesBuilder = ImmutableDictionary.CreateBuilder<string, string>();
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (4)
715return ImmutableDictionary.Create<K, V>(); 718return ImmutableDictionary.CreateRange(items); 726return ImmutableDictionary.Create<K, V>(keyComparer); 729return ImmutableDictionary.CreateRange(keyComparer, items);
src\Compilers\Core\Portable\InternalUtilities\ImmutableSetWithInsertionOrder`1.cs (1)
15public static readonly ImmutableSetWithInsertionOrder<T> Empty = new ImmutableSetWithInsertionOrder<T>(ImmutableDictionary.Create<T, uint>(), 0u);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
FileSet.cs (1)
26var builder = ImmutableDictionary.CreateBuilder<string, object>(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Options\OptionsTestInfo.cs (1)
26var resultBuilder = ImmutableDictionary.CreateBuilder<string, OptionsTestInfo>();
OptionsCollection.cs (1)
100var builder = ImmutableDictionary.CreateBuilder<string, string>(AnalyzerConfigOptions.KeyComparer);
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>()
TestAnalyzerReferenceByLanguage.cs (1)
49var newAnalyzersMap = ImmutableDictionary.CreateRange(
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Options\DocumentOptionSetTests.cs (2)
26new DictionaryAnalyzerConfigOptions(ImmutableDictionary.Create<string, string>(AnalyzerConfigOptions.KeyComparer).Add( 128ImmutableDictionary.Create<string, string>(AnalyzerConfigOptions.KeyComparer).Add(
Microsoft.Interop.ComInterfaceGenerator (4)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
136ImmutableDictionary<string, string>.Builder properties = ImmutableDictionary.CreateBuilder<string, string>();
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
45var optionsBuilder = ImmutableDictionary.CreateBuilder<string, Option>();
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
61ImmutableDictionary<string, Option>.Builder options = ImmutableDictionary.CreateBuilder<string, Option>();
VtableIndexStubGenerator.cs (1)
138var namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
Microsoft.Interop.LibraryImportGenerator (5)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
83ImmutableDictionary<string, string>.Builder properties = ImmutableDictionary.CreateBuilder<string, string>();
Analyzers\ConvertToLibraryImportFixer.cs (1)
58var optionsBuilder = ImmutableDictionary.CreateBuilder<string, Option>();
Analyzers\CustomMarshallerAttributeAnalyzer.cs (1)
35var builder = ImmutableDictionary.CreateBuilder<string, string>();
LibraryImportGenerator.cs (1)
200ImmutableDictionary<string, TypedConstant> namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
61ImmutableDictionary<string, Option>.Builder options = ImmutableDictionary.CreateBuilder<string, Option>();
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
142ImmutableDictionary<string, TypedConstant> namedArguments = ImmutableDictionary.CreateRange(attrData.NamedArguments);
Microsoft.Interop.SourceGeneration (4)
MarshalAsParser.cs (1)
135ImmutableDictionary<string, TypedConstant> namedArguments = ImmutableDictionary.CreateRange(attributeData.NamedArguments);
Marshalling\NoMarshallingInfoErrorResolver.cs (1)
41=> ImmutableDictionary.CreateRange(new Dictionary<ManagedTypeInfo, string>
MarshalUsingAttributeParser.cs (1)
66ImmutableDictionary<string, TypedConstant> namedArgs = ImmutableDictionary.CreateRange(attributeData.NamedArguments);
UseSiteAttributeProvider.cs (1)
36ImmutableDictionary<int, UseSiteAttributeData>.Builder useSiteAttributesByIndirectionDepth = ImmutableDictionary.CreateBuilder<int, UseSiteAttributeData>();
Microsoft.VisualStudio.LanguageServices (10)
CodeLens\CodeLensCallbackListener.cs (1)
63var builder = ImmutableDictionary.CreateBuilder<Guid, string>();
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
122var descriptorsMap = ImmutableDictionary.CreateBuilder<string, IEnumerable<DiagnosticDescriptor>>();
Snippets\SnippetExpansionClient.cs (1)
1176public ImmutableDictionary<string, string> _arguments = ImmutableDictionary.Create<string, string>();
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (1)
302var builder = ImmutableDictionary.CreateBuilder<string, Document>();
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (6)
419builder ??= ImmutableDictionary.CreateBuilder<Document, ImmutableArray<Diagnostic>>(); 438projectDiagsBuilder ??= ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>(); 454var builder = ImmutableDictionary.CreateBuilder<DocumentId, List<DiagnosticData>>(); 473var finalBuilder = ImmutableDictionary.CreateBuilder<Document, ImmutableArray<Diagnostic>>(); 546var builder = ImmutableDictionary.CreateBuilder<ProjectId, List<DiagnosticData>>(); 565var finalBuilder = ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>();
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
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);
MSBuild (3)
CopyOnWriteDictionary.cs (3)
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); 94: ImmutableDictionary.Create<string, V>(keyComparer);
Sample (1)
Program.cs (1)
113schemas.MapGet("/frozen-dictionary-of-ints", () => ImmutableDictionary.CreateRange(new Dictionary<string, int> { { "one", 1 }, { "two", 2 } }));
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
331factoryTypeFullName = typeof(ImmutableDictionary).FullName;
System.Windows.Forms.Analyzers.CSharp.Tests (1)
CompilerAnalyzerConfigOptions.cs (1)
17public static CompilerAnalyzerConfigOptions Empty { get; } = new(ImmutableDictionary.Create<string, string>());