210 references to Add
Aspire.Dashboard.Components.Tests (3)
Pages\ResourcesTests.cs (3)
555.Add(KnownProperties.Parameter.Value, new ResourcePropertyViewModel( 599.Add(KnownProperties.Parameter.Value, new ResourcePropertyViewModel( 641.Add(KnownProperties.Parameter.Value, new ResourcePropertyViewModel(
Aspire.Hosting.Analyzers.Tests (1)
AnalyzerTest.cs (1)
39.Add("ASPIREATS001", ReportDiagnostic.Suppress);
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (2)
80_forwardMap.Add(key, value), 81_backwardMap.Add(value, key));
Microsoft.CodeAnalysis (5)
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (2)
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);
InternalUtilities\ImmutableSetWithInsertionOrder`1.cs (1)
44return new ImmutableSetWithInsertionOrder<T>(_map.Add(value, _nextElementValue), _nextElementValue + 1u);
ReferenceManager\CommonReferenceManager.Binding.cs (2)
315implicitReferenceResolutions = implicitReferenceResolutions.Add(assemblyIdentity, null); 570implicitReferenceResolutions = implicitReferenceResolutions.Add(referenceIdentity, resolvedReference);
Microsoft.CodeAnalysis.Analyzers (6)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (2)
675var properties = ImmutableDictionary<string, string?>.Empty.Add(DefineDescriptorArgumentCorrectlyFixValue, fixValue); 683properties = properties.Add(DefineDescriptorArgumentCorrectlyFixAdditionalDocumentLocationInfo, $"{span.Start}{AdditionalDocumentLocationInfoSeparator}{span.Length}{AdditionalDocumentLocationInfoSeparator}{fixLocation.GetLineSpan().Path}");
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (2)
289var properties = ImmutableDictionary<string, string?>.Empty.Add( 326var properties = ImmutableDictionary<string, string?>.Empty.Add(propertyName, newEntry);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (2)
80_forwardMap.Add(key, value), 81_backwardMap.Add(value, key));
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (2)
80_forwardMap.Add(key, value), 81_backwardMap.Add(value, key));
Microsoft.CodeAnalysis.CodeStyle (36)
src\roslyn\src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
33protected static readonly ImmutableDictionary<string, string?> ModifiersAddedProperties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (2)
40properties = properties.Add(AddRequiredParenthesesConstants.IncludeInFixAll, ""); 43properties = properties.Add(AddRequiredParenthesesConstants.EquivalenceKey, equivalenceKey);
src\roslyn\src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
26ImmutableDictionary<string, string?>.Empty.Add(ForEachCastHelpers.IsFixable, ForEachCastHelpers.IsFixable);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (2)
117.Add(WellKnownDiagnosticTags.Unnecessary, Enumerable.Range(additionalLocations.Length, additionalUnnecessaryLocations.Length)); 188.Add(WellKnownDiagnosticTags.Unnecessary, Enumerable.Range(additionalLocations.Length, additionalUnnecessaryLocations.Length));
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
88properties: ImmutableDictionary<string, string?>.Empty.Add(MatchFolderAndNamespaceConstants.TargetNamespace, targetNamespace),
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
70.Add(PopulateSwitchStatementHelpers.MissingCases, missingCases.ToString()) 71.Add(PopulateSwitchStatementHelpers.MissingDefaultCase, missingDefaultCase.ToString());
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
108properties = properties.Add(DocCommentIdKey, "~" + docCommentId);
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (11)
28= s_takeCondition.Add(Negate, Negate); 30= s_takeCondition.Add(Or, Or).Add(WhenFalse, WhenFalse); 32= s_negateCondition.Add(And, And).Add(WhenFalse, WhenFalse); 34= s_negateCondition.Add(Or, Or).Add(WhenTrue, WhenTrue); 36= s_takeCondition.Add(And, And).Add(WhenTrue, WhenTrue); 38= s_takeCondition.Add(And, And).Add(WhenFalse, WhenFalse);
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
654properties = properties.Add(IsTrivialGetAccessor, IsTrivialGetAccessor); 657properties = properties.Add(IsTrivialSetAccessor, IsTrivialSetAccessor);
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
188properties = properties.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (1)
20ImmutableDictionary<string, string?>.Empty.Add(UseCollectionExpressionName, UseCollectionExpressionName);
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
165.Add(UseCompoundAssignmentUtilities.Increment, UseCompoundAssignmentUtilities.Increment))); 185.Add(UseCompoundAssignmentUtilities.Decrement, UseCompoundAssignmentUtilities.Decrement)));
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
21ImmutableDictionary<string, string?>.Empty.Add(CanSimplifyName, CanSimplifyName);
src\roslyn\src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
61var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (3)
107var properties = ImmutableDictionary<string, string?>.Empty.Add( 128properties = properties.Add(UseIsNullConstants.UnconstrainedGeneric, ""); 137properties = properties.Add(UseIsNullConstants.Negated, "");
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (2)
67ImmutableDictionary<string, string?>.Empty.Add(UseNullPropagationHelpers.WhenPartIsNullable, ""); 246properties = properties.Add(UseNullPropagationHelpers.IsTrivialNullableValueAccess, UseNullPropagationHelpers.IsTrivialNullableValueAccess);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (2)
80_forwardMap.Add(key, value), 81_backwardMap.Add(value, key));
Microsoft.CodeAnalysis.CSharp (2)
Lowering\ExtensionMethodBodyRewriter.cs (2)
45_symbolMap = _symbolMap.Add(receiverParameter.UnderlyingParameter, receiverParameter); 99_symbolMap = _symbolMap.Add(node.Symbol, rewritten);
Microsoft.CodeAnalysis.CSharp.CodeStyle (21)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (2)
74.Add(Constants.NodeToGenerateKey, ((int)nodeToGenerate).ToString(CultureInfo.InvariantCulture)) 75.Add(Constants.ShouldRemoveNextStatementKey, shouldRemoveNextStatement.ToString(CultureInfo.InvariantCulture))));
src\roslyn\src\Analyzers\CSharp\Analyzers\HiddenExplicitCast\CSharpHiddenExplicitCastDiagnosticAnalyzer.cs (1)
117properties: ImmutableDictionary<string, string?>.Empty.Add(Type, typeToInsertCastFor),
src\roslyn\src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
176var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
21private static readonly ImmutableDictionary<string, string?> s_subsequentSectionProperties = ImmutableDictionary<string, string?>.Empty.Add(IsSubsequentSection, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (1)
21ImmutableDictionary<string, string?>.Empty.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
1234properties = properties.Add(UnwrapArgument, ""); 1237properties = properties.Add(UseSpread, ""); 1240properties = properties.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (2)
105var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(UseExpressionBody), ""); 121properties = properties.Add(FixesError, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (3)
33private static readonly ImmutableDictionary<string, string?> BuiltInTypeProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.BuiltInType); 34private static readonly ImmutableDictionary<string, string?> TypeIsApparentProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.TypeIsApparent); 35private static readonly ImmutableDictionary<string, string?> ElsewhereProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.Elsewhere);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (2)
19ImmutableDictionary<string, string?>.Empty.Add(UseIsNullConstants.Kind, UseIsNullConstants.CastAndEqualityKey); 21s_properties.Add(UseIsNullConstants.Negated, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
106ImmutableDictionary<string, string?>.Empty.Add(NameKey, stringValue)));
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
31private static readonly ImmutableDictionary<string, string?> s_safeProperties = ImmutableDictionary<string, string?>.Empty.Add(SafeKey, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (2)
178properties = properties.Add(AllFieldsName, AllFieldsName); 184properties = properties.Add(AllPropertiesName, AllPropertiesName);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
143var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(ArrayCreationOperationLocation), operationLocation.ToString());
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
526removedMembers = removedMembers.Add(member, (memberNode, nodeToRemove));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
49.Add(document, [fixAllSpan]);
Microsoft.CodeAnalysis.CSharp.Features (22)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (2)
74.Add(Constants.NodeToGenerateKey, ((int)nodeToGenerate).ToString(CultureInfo.InvariantCulture)) 75.Add(Constants.ShouldRemoveNextStatementKey, shouldRemoveNextStatement.ToString(CultureInfo.InvariantCulture))));
src\roslyn\src\Analyzers\CSharp\Analyzers\HiddenExplicitCast\CSharpHiddenExplicitCastDiagnosticAnalyzer.cs (1)
117properties: ImmutableDictionary<string, string?>.Empty.Add(Type, typeToInsertCastFor),
src\roslyn\src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
176var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\CSharpRemoveUnreachableCodeDiagnosticAnalyzer.cs (1)
21private static readonly ImmutableDictionary<string, string?> s_subsequentSectionProperties = ImmutableDictionary<string, string?>.Empty.Add(IsSubsequentSection, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (1)
21ImmutableDictionary<string, string?>.Empty.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
1234properties = properties.Add(UnwrapArgument, ""); 1237properties = properties.Add(UseSpread, ""); 1240properties = properties.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (2)
105var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(UseExpressionBody), ""); 121properties = properties.Add(FixesError, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (3)
33private static readonly ImmutableDictionary<string, string?> BuiltInTypeProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.BuiltInType); 34private static readonly ImmutableDictionary<string, string?> TypeIsApparentProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.TypeIsApparent); 35private static readonly ImmutableDictionary<string, string?> ElsewhereProperties = ImmutableDictionary<string, string?>.Empty.Add(CSharpTypeStyleUtilities.EquivalenceyKey, CSharpTypeStyleUtilities.Elsewhere);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (2)
19ImmutableDictionary<string, string?>.Empty.Add(UseIsNullConstants.Kind, UseIsNullConstants.CastAndEqualityKey); 21s_properties.Add(UseIsNullConstants.Negated, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
106ImmutableDictionary<string, string?>.Empty.Add(NameKey, stringValue)));
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
31private static readonly ImmutableDictionary<string, string?> s_safeProperties = ImmutableDictionary<string, string?>.Empty.Add(SafeKey, "");
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (2)
178properties = properties.Add(AllFieldsName, AllFieldsName); 184properties = properties.Add(AllPropertiesName, AllPropertiesName);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
143var properties = ImmutableDictionary<string, string?>.Empty.Add(nameof(ArrayCreationOperationLocation), operationLocation.ToString());
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
526removedMembers = removedMembers.Add(member, (memberNode, nodeToRemove));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
49.Add(document, [fixAllSpan]);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (4)
Formatting\OmniSharpSyntaxFormattingOptionsWrapper.cs (4)
29.Add(FormattingOptions2.TabSize.Definition.ConfigName, FormattingOptions2.TabSize.Definition.Serializer.Serialize(fallbackLineFormattingOptions.TabSize)) 30.Add(FormattingOptions2.IndentationSize.Definition.ConfigName, FormattingOptions2.IndentationSize.Definition.Serializer.Serialize(fallbackLineFormattingOptions.IndentationSize)) 31.Add(FormattingOptions2.UseTabs.Definition.ConfigName, FormattingOptions2.UseTabs.Definition.Serializer.Serialize(fallbackLineFormattingOptions.UseTabs)) 32.Add(FormattingOptions2.NewLine.Definition.ConfigName, FormattingOptions2.NewLine.Definition.Serializer.Serialize(fallbackLineFormattingOptions.NewLine)))));
Microsoft.CodeAnalysis.Features (48)
CodeFixes\Service\CodeFixService.cs (1)
935fixerMap = fixerMap.Add(diagnosticId, lazyMap);
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (1)
61.Add(SnippetCompletionItem.LSPSnippetKey, lspSnippet);
EditAndContinue\DeclarationBodyMap.cs (1)
40=> new(Forward, Reverse, AdditionalReverseMapping.Add(newNode, oldNode));
EditAndContinue\EditSession.cs (1)
1245staleProjects = staleProjects.Add(newProject.Id, new StaleProjectInfo(mvid, staleDocumentPath));
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionAnalyzer.cs (1)
30ImmutableDictionary<string, string?>.Empty.Add(StrictKey, "");
Extensions\ExtensionFolder.cs (1)
124_assemblyFilePathToHandlers = _assemblyFilePathToHandlers.Add(
FindUsages\DefinitionItem.cs (1)
262properties = properties.Add(NonNavigable, "");
FindUsages\DefinitionItemFactory.cs (6)
154.Add(DefinitionItem.MetadataSymbolKey, SymbolKey.CreateString(symbol)) 155.Add(DefinitionItem.MetadataSymbolOriginatingProjectIdGuid, originatingProjectId.Id.ToString()) 156.Add(DefinitionItem.MetadataSymbolOriginatingProjectIdDebugName, originatingProjectId.DebugName ?? ""); 271properties = properties.Add(DefinitionItem.Primary, ""); 277properties = properties.Add(DefinitionItem.RQNameKey1, rqName); 287properties = properties.Add(DefinitionItem.RQNameKey2, rqName);
PreferFrameworkType\PreferFrameworkTypeConstants.cs (1)
13ImmutableDictionary<string, string?>.Empty.Add(PreferFrameworkType, "");
src\roslyn\src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
33protected static readonly ImmutableDictionary<string, string?> ModifiersAddedProperties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (2)
40properties = properties.Add(AddRequiredParenthesesConstants.IncludeInFixAll, ""); 43properties = properties.Add(AddRequiredParenthesesConstants.EquivalenceKey, equivalenceKey);
src\roslyn\src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
26ImmutableDictionary<string, string?>.Empty.Add(ForEachCastHelpers.IsFixable, ForEachCastHelpers.IsFixable);
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (2)
117.Add(WellKnownDiagnosticTags.Unnecessary, Enumerable.Range(additionalLocations.Length, additionalUnnecessaryLocations.Length)); 188.Add(WellKnownDiagnosticTags.Unnecessary, Enumerable.Range(additionalLocations.Length, additionalUnnecessaryLocations.Length));
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
88properties: ImmutableDictionary<string, string?>.Empty.Add(MatchFolderAndNamespaceConstants.TargetNamespace, targetNamespace),
src\roslyn\src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (2)
70.Add(PopulateSwitchStatementHelpers.MissingCases, missingCases.ToString()) 71.Add(PopulateSwitchStatementHelpers.MissingDefaultCase, missingDefaultCase.ToString());
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
108properties = properties.Add(DocCommentIdKey, "~" + docCommentId);
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (11)
28= s_takeCondition.Add(Negate, Negate); 30= s_takeCondition.Add(Or, Or).Add(WhenFalse, WhenFalse); 32= s_negateCondition.Add(And, And).Add(WhenFalse, WhenFalse); 34= s_negateCondition.Add(Or, Or).Add(WhenTrue, WhenTrue); 36= s_takeCondition.Add(And, And).Add(WhenTrue, WhenTrue); 38= s_takeCondition.Add(And, And).Add(WhenFalse, WhenFalse);
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
654properties = properties.Add(IsTrivialGetAccessor, IsTrivialGetAccessor); 657properties = properties.Add(IsTrivialSetAccessor, IsTrivialSetAccessor);
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
188properties = properties.Add(UseCollectionInitializerHelpers.ChangesSemanticsName, "");
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\UseCollectionInitializerHelpers.cs (1)
20ImmutableDictionary<string, string?>.Empty.Add(UseCollectionExpressionName, UseCollectionExpressionName);
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
165.Add(UseCompoundAssignmentUtilities.Increment, UseCompoundAssignmentUtilities.Increment))); 185.Add(UseCompoundAssignmentUtilities.Decrement, UseCompoundAssignmentUtilities.Decrement)));
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
21ImmutableDictionary<string, string?>.Empty.Add(CanSimplifyName, CanSimplifyName);
src\roslyn\src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
61var properties = ImmutableDictionary<string, string?>.Empty.Add(
src\roslyn\src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (3)
107var properties = ImmutableDictionary<string, string?>.Empty.Add( 128properties = properties.Add(UseIsNullConstants.UnconstrainedGeneric, ""); 137properties = properties.Add(UseIsNullConstants.Negated, "");
src\roslyn\src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (2)
67ImmutableDictionary<string, string?>.Empty.Add(UseNullPropagationHelpers.WhenPartIsNullable, ""); 246properties = properties.Add(UseNullPropagationHelpers.IsTrivialNullableValueAccess, UseNullPropagationHelpers.IsTrivialNullableValueAccess);
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
AbstractResxGenerator.cs (1)
210remappedNames = remappedNames.Add(resourceName, candidateName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (2)
80_forwardMap.Add(key, value), 81_backwardMap.Add(value, key));
Microsoft.CodeAnalysis.VisualBasic (3)
Compilation\VisualBasicCompilation.vb (3)
964ordinalMap = ordinalMap.Add(tree, oldTreeCount + i) 1041ordinalMap = ordinalMap.Add(tree, i) 1125ordinalMap = ordinalMap.Add(newTree, oldOrdinal)
Microsoft.CodeAnalysis.Workspaces (12)
Diagnostics\DiagnosticData.cs (2)
99= ImmutableDictionary<string, string?>.Empty.Add(WellKnownDiagnosticPropertyNames.Origin, WellKnownDiagnosticTags.Build); 243additionalProperties = additionalProperties.Add(nameof(documentPropertiesService.DiagnosticsLspClientName), diagnosticsLspClientName);
Diagnostics\HostDiagnosticAnalyzers.cs (2)
328current = current.Add(referenceIdentity, [.. analyzers.Where(seen.Add)]); 350box.Value = box.Value.Add(project.Language, info);
Options\GlobalOptionService.cs (1)
131currentValues = currentValues.Add(optionKey, value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (2)
80_forwardMap.Add(key, value), 81_backwardMap.Add(value, key));
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
173ProjectReferenceInfos = _projectUpdateState.ProjectReferenceInfos.Add(projectId, new ProjectReferenceInformation([], []))
Workspace\ProjectSystem\ProjectSystemProjectFactory.ProjectUpdateState.cs (1)
83return map.Add(path, [projectId]);
Workspace\Solution\ProjectDependencyGraph.cs (2)
296_transitiveReferencesMap = _transitiveReferencesMap.Add(projectId, transitiveReferences); 349_reverseTransitiveReferencesMap = _reverseTransitiveReferencesMap.Add(projectId, reverseTransitiveReferences);
Workspace\Solution\Solution.cs (1)
554newFallbackOptions = newFallbackOptions.Add(language, provider.GetOptions(language));
Microsoft.DotNet.HotReload.Watch (9)
UI\IReporter.cs (9)
166s_descriptors = s_descriptors.Add(id, descriptor); 174.Add(DotNetWatchContext.DefaultLogComponentName, Emoji.Watch) 175.Add(DotNetWatchContext.BuildLogComponentName, Emoji.Build) 176.Add(HotReloadDotNetWatcher.ClientLogComponentName, Emoji.HotReload) 177.Add(HotReloadDotNetWatcher.AgentLogComponentName, Emoji.Agent) 178.Add(BrowserRefreshServer.ServerLogComponentName, Emoji.Refresh) 179.Add(BrowserConnection.AgentLogComponentName, Emoji.Agent) 180.Add(BrowserConnection.ServerLogComponentName, Emoji.Browser) 181.Add(AspireServiceFactory.AspireLogComponentName, Emoji.Aspire);
Microsoft.Interop.ComInterfaceGenerator (2)
ComInterfaceGenerator.cs (1)
292ImmutableDictionary<string, string>.Empty.Add(GeneratorDiagnosticProperties.AddMarshalAsAttribute, "Error"),
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
134var selectedOptions = fix.SelectedOptions.Add(Option.AllowUnsafe, new Option.Bool(true));
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\ConvertToLibraryImportFixer.cs (2)
118selectedOptions.Add(SelectedSuffixOption, new Option.String("A"))); 133selectedOptions.Add(SelectedSuffixOption, new Option.String("W")));
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
134var selectedOptions = fix.SelectedOptions.Add(Option.AllowUnsafe, new Option.Bool(true));
Microsoft.Interop.SourceGeneration (5)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (1)
25ImmutableDictionary<string, string>.Empty.Add(GeneratorDiagnosticProperties.AddDisableRuntimeMarshallingAttribute, GeneratorDiagnosticProperties.AddDisableRuntimeMarshallingAttribute);
Marshalling\BlittableMarshallerResolver.cs (1)
19ImmutableDictionary<string, string>.Empty.Add(GeneratorDiagnosticProperties.AddDisableRuntimeMarshallingAttribute, GeneratorDiagnosticProperties.AddDisableRuntimeMarshallingAttribute);
Marshalling\GeneratorDiagnostic.cs (1)
57DiagnosticProperties.Add(WellKnownDiagnosticTags.Unnecessary, $"[{string.Join(",", Enumerable.Range(0, UnnecessaryDataLocations.Length))}]"),
MarshallingAttributeInfo.cs (1)
179new CustomTypeMarshallers(ImmutableDictionary<MarshalMode, CustomTypeMarshallerData>.Empty.Add(
SafeHandleMarshallingInfoProvider.cs (1)
80.Add(
Microsoft.ML.InternalCodeAnalyzer (2)
NameAnalyzer.cs (2)
36.Add(NameProperty, text).Add(DesiredNameProperty, desired.ToString());
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (1)
CachingWorkloadResolver.cs (1)
213CachedResults = _cachedState.CachedResults.Add(sdkReferenceName, resolutionResult)
Roslyn.Diagnostics.Analyzers (11)
ExportedPartsShouldHaveImportingConstructor.cs (4)
164public static readonly ImmutableDictionary<string, string?> ImplicitConstructor = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(ImplicitConstructor)); 165public static readonly ImmutableDictionary<string, string?> NonPublicConstructor = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(NonPublicConstructor)); 166public static readonly ImmutableDictionary<string, string?> MissingAttribute = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MissingAttribute)); 167public static readonly ImmutableDictionary<string, string?> MultipleConstructors = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MultipleConstructors));
ImportingConstructorShouldBeObsolete.cs (5)
179public static readonly ImmutableDictionary<string, string?> MissingAttribute = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MissingAttribute)); 180public static readonly ImmutableDictionary<string, string?> MissingDescription = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MissingDescription)); 181public static readonly ImmutableDictionary<string, string?> IncorrectDescription = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(IncorrectDescription)); 182public static readonly ImmutableDictionary<string, string?> MissingError = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(MissingError)); 183public static readonly ImmutableDictionary<string, string?> ErrorSetToFalse = ImmutableDictionary.Create<string, string?>().Add(nameof(Scenario), nameof(ErrorSetToFalse));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (2)
80_forwardMap.Add(key, value), 81_backwardMap.Add(value, key));
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
49.Add(document, [fixAllSpan]);
System.Collections.Immutable (3)
System\Collections\Immutable\ImmutableDictionary_2.cs (1)
513return this.Add(key, value);
System\Collections\Immutable\ImmutableInterlocked.cs (2)
322ImmutableDictionary<TKey, TValue> updatedCollection = priorCollection.Add(key, value); 451ImmutableDictionary<TKey, TValue> updatedCollection = priorCollection.Add(key, value);