Implemented interface member:
171 references to Add
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
147builder.Add(language, kindBuilder.ToImmutable());
ILLink.RoslynAnalyzer (1)
DataFlow\LValueFlowCaptureProvider.cs (1)
69 lvalueFlowCaptureIdBuilder.Add (flowCaptureReference.Id, captureKind);
Microsoft.AspNetCore.App.Analyzers (16)
Http\HeaderDictionaryIndexerAnalyzer.cs (2)
172propertiesBuilder.Add("HeaderName", headerName); 173propertiesBuilder.Add("ResolvedPropertyName", propertyName);
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (5)
259properties.Add(StartKey, textChange.Span.Start.ToString(CultureInfo.InvariantCulture)); 260properties.Add(LengthKey, textChange.Span.Length.ToString(CultureInfo.InvariantCulture)); 261properties.Add(NewTextKey, textChange.NewText ?? string.Empty); 262properties.Add(DescriptionKey, embeddedItem.FullDescription); 266properties.Add(NewPositionKey, change.NewPosition.Value.ToString(CultureInfo.InvariantCulture));
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (4)
98propertiesBuilder.Add("RouteParameterName", unusedParameter.Name); 99propertiesBuilder.Add("RouteParameterPolicy", string.Join(string.Empty, unusedParameter.Policies)); 100propertiesBuilder.Add("RouteParameterIsOptional", unusedParameter.IsOptional.ToString(CultureInfo.InvariantCulture)); 101propertiesBuilder.Add("RouteParameterInsertIndex", parameterInsertIndex.ToString(CultureInfo.InvariantCulture));
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (5)
138properties.Add(StartKey, textChange.Span.Start.ToString(CultureInfo.InvariantCulture)); 139properties.Add(LengthKey, textChange.Span.Length.ToString(CultureInfo.InvariantCulture)); 140properties.Add(NewTextKey, textChange.NewText ?? string.Empty); 141properties.Add(DescriptionKey, embeddedItem.FullDescription); 145properties.Add(NewPositionKey, change.NewPosition.Value.ToString(CultureInfo.InvariantCulture));
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\Converters\DictionaryAdapters\ImmutableDictionaryBufferAdapter.cs (1)
14buffer.Add(key, value);
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\Converters\DictionaryAdapters\ImmutableDictionaryBufferAdapter.cs (1)
14buffer.Add(key, value);
Microsoft.CodeAnalysis (20)
CommandLine\AnalyzerConfigSet.cs (3)
569_values.Add(section.Name, sectionDict); 588sectionDict.Add(key, (value, configPath, globalLevel)); 609_duplicates.Add(section.Name, duplicateDict);
CommandLine\CommonCompiler.cs (2)
1028builder.Add(syntaxTree, new DictionaryAnalyzerConfigOptions(options)); 1043builder.Add(additionalFiles[i], new DictionaryAnalyzerConfigOptions(options));
Compilation\SyntaxTreeOptionsProvider.cs (1)
65builder.Add(
DiagnosticAnalyzer\AnalysisResultBuilder.cs (4)
547perTreeBuilder.Add(diagnosticsByAnalyzer.Key, diagnostics); 552builder.Add(key, perTreeBuilder.ToImmutable()); 577builder.Add(diagnosticsByAnalyzer.Key, diagnostics); 602builder.Add(analyzer, telemetryInfo);
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1171mapBuilder.Add(diagnostic, new ProgrammaticSuppressionInfo(set.ToImmutableAndFree()));
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (1)
844builder.Add(analyzer, actionCounts);
Emit\CommonPEModuleBuilder.cs (2)
989builder.Add(entry.Key, entry.Value.GetAllMembers()); 997builder.Add(entry.Key, entry.Value.ToImmutableArray<ISymbolInternal>());
Operations\ControlFlowGraphBuilder.RegionBuilder.cs (2)
348localFunctionsMap.Add(method, (result, operation, localFunctionsBefore++)); 407argument.map.Add(operation, (argument.region, argument.map.Count));
ReferenceManager\CommonReferenceManager.State.cs (1)
567lazyBuilder.Add(sourceIdentity, originalIdentity);
RuleSet\RuleSetProcessor.cs (1)
126specificOptions.Add(ruleId, action);
SourceGeneration\Nodes\GeneratorRunStateTable.cs (1)
68resultBuilder.Add(stepsByName.Key, stepsByName.Value.ToImmutableArrayOrEmpty());
SourceGeneration\Nodes\HostOutputNode.cs (1)
82context.HostOutputBuilder.Add(key, value);
Microsoft.CodeAnalysis.CodeStyle (13)
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (4)
97properties.Add(RedundantEqualityConstants.RedundantSide, RedundantEqualityConstants.Right); 99properties.Add(RedundantEqualityConstants.Negate, RedundantEqualityConstants.Negate); 103properties.Add(RedundantEqualityConstants.RedundantSide, RedundantEqualityConstants.Left); 105properties.Add(RedundantEqualityConstants.Negate, RedundantEqualityConstants.Negate);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (4)
175propertiesBuilder.Add(UnusedValuePreferenceKey, preference.ToString()); 178propertiesBuilder.Add(IsUnusedLocalAssignmentKey, string.Empty); 183propertiesBuilder.Add(IsRemovableAssignmentKey, string.Empty); 186builder.Add((preference, isUnusedLocalAssignment, isRemovableAssignment), propertiesBuilder.ToImmutable());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (1)
64lvalueFlowCaptureIdBuilder.Add(flowCaptureReference.Id, captureKind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
135builder.Add(namingStyle.ID, name); 164builder.Add(rule, $"{serializedNameMap[rule.SymbolSpecificationID]}_should_be_{serializedNameMap[rule.NamingStyleID]}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
66builder.Add(alias.Target, alias);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
50result.Add(key, items.ToImmutableAndFree());
Microsoft.CodeAnalysis.CSharp (9)
Binder\Imports.cs (1)
78expandedAliasesBuilder.Add(name, new AliasAndUsingDirective(directive.Alias.ToNewSubmission(newSubmission), directive.UsingDirective));
BoundTree\NullabilityRewriter.cs (4)
175_remappedSymbols.Add(lambda, updatedLambda); 180_remappedSymbols.Add(lambda.Parameters[i], updatedLambda.Parameters[i]); 198_remappedSymbols.Add(local, local); 203_remappedSymbols.Add(local, updatedLocal);
Compilation\SyntaxAndDeclarationManager.cs (1)
585lastComputedMemberNamesMap.Add(newTree, lastComputedMemberNames);
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
227builder.Add(aliasSymbol.Target, aliasSymbol);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (1)
724usingAliasesMap.Add(identifierValueText, aliasAndDirective);
Symbols\TypeSymbol.cs (1)
2329map.Add(implemented, body);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (3)
325additionalValuesBuilder.Add(property, captured); 388dictionaryBuilder.Add(property, syntax); 464dictionaryBuilder.Add(symbol, captured);
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (3)
325additionalValuesBuilder.Add(property, captured); 388dictionaryBuilder.Add(property, syntax); 464dictionaryBuilder.Add(symbol, captured);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
SourceGeneration\GeneratorDriverTests.cs (2)
2621builder.Add("test", "value1"); 2658builder.Add("test", "value2");
Microsoft.CodeAnalysis.EditorFeatures (1)
IntelliSense\AsyncCompletion\FilterSet.cs (1)
115mapBuilder.Add(tag, filterWithMask);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (40)
SpecialTypeExtensions.cs (21)
26builder.Add(SpecialType.System_Void, new QualifiedTypeSignature(systemNamespace, "Void")); 27builder.Add(SpecialType.System_Boolean, new QualifiedTypeSignature(systemNamespace, "Boolean")); 28builder.Add(SpecialType.System_Char, new QualifiedTypeSignature(systemNamespace, "Char")); 29builder.Add(SpecialType.System_SByte, new QualifiedTypeSignature(systemNamespace, "SByte")); 30builder.Add(SpecialType.System_Byte, new QualifiedTypeSignature(systemNamespace, "Byte")); 31builder.Add(SpecialType.System_Int16, new QualifiedTypeSignature(systemNamespace, "Int16")); 32builder.Add(SpecialType.System_UInt16, new QualifiedTypeSignature(systemNamespace, "UInt16")); 33builder.Add(SpecialType.System_Int32, new QualifiedTypeSignature(systemNamespace, "Int32")); 34builder.Add(SpecialType.System_UInt32, new QualifiedTypeSignature(systemNamespace, "UInt32")); 35builder.Add(SpecialType.System_Int64, new QualifiedTypeSignature(systemNamespace, "Int64")); 36builder.Add(SpecialType.System_UInt64, new QualifiedTypeSignature(systemNamespace, "UInt64")); 37builder.Add(SpecialType.System_Single, new QualifiedTypeSignature(systemNamespace, "Single")); 38builder.Add(SpecialType.System_Double, new QualifiedTypeSignature(systemNamespace, "Double")); 39builder.Add(SpecialType.System_String, new QualifiedTypeSignature(systemNamespace, "String")); 40builder.Add(SpecialType.System_Object, new QualifiedTypeSignature(systemNamespace, "Object")); 41builder.Add(SpecialType.System_Decimal, new QualifiedTypeSignature(systemNamespace, "Decimal")); 42builder.Add(SpecialType.System_IntPtr, new QualifiedTypeSignature(systemNamespace, "IntPtr")); 43builder.Add(SpecialType.System_UIntPtr, new QualifiedTypeSignature(systemNamespace, "UIntPtr")); 44builder.Add(SpecialType.System_TypedReference, new QualifiedTypeSignature(systemNamespace, "TypedReference")); 45builder.Add(SpecialType.System_Nullable_T, new QualifiedTypeSignature(systemNamespace, "Nullable")); 46builder.Add(SpecialType.System_DateTime, new QualifiedTypeSignature(systemNamespace, "DateTime"));
VisualBasic\SyntaxKind.cs (19)
43builder.Add("of", SyntaxKind.OfKeyword); 44builder.Add("byval", SyntaxKind.ByValKeyword); 45builder.Add("byref", SyntaxKind.ByRefKeyword); 46builder.Add("boolean", SyntaxKind.BooleanKeyword); 47builder.Add("char", SyntaxKind.CharKeyword); 48builder.Add("sbyte", SyntaxKind.SByteKeyword); 49builder.Add("byte", SyntaxKind.ByteKeyword); 50builder.Add("short", SyntaxKind.ShortKeyword); 51builder.Add("ushort", SyntaxKind.UShortKeyword); 52builder.Add("integer", SyntaxKind.IntegerKeyword); 53builder.Add("uinteger", SyntaxKind.UIntegerKeyword); 54builder.Add("long", SyntaxKind.LongKeyword); 55builder.Add("ulong", SyntaxKind.ULongKeyword); 56builder.Add("single", SyntaxKind.SingleKeyword); 57builder.Add("double", SyntaxKind.DoubleKeyword); 58builder.Add("string", SyntaxKind.StringKeyword); 59builder.Add("object", SyntaxKind.ObjectKeyword); 60builder.Add("decimal", SyntaxKind.DecimalKeyword); 61builder.Add("date", SyntaxKind.DateKeyword);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
VS\IFSharpWorkspaceProjectContextFactory.cs (1)
160builder.Add(reference.FilePath, reference);
Microsoft.CodeAnalysis.Features (12)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
200diagnosticsMapBuilder.Add(targetSymbol, diagnosticsForSymbol);
EmbeddedLanguages\RegularExpressions\RegexParser.CaptureInfoAnalyzer.cs (2)
203mapping.Add(val, span); 222_captureNumberToSpan.Add(_autoNumber, _captureNameToSpan[name]);
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (4)
97properties.Add(RedundantEqualityConstants.RedundantSide, RedundantEqualityConstants.Right); 99properties.Add(RedundantEqualityConstants.Negate, RedundantEqualityConstants.Negate); 103properties.Add(RedundantEqualityConstants.RedundantSide, RedundantEqualityConstants.Left); 105properties.Add(RedundantEqualityConstants.Negate, RedundantEqualityConstants.Negate);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (4)
175propertiesBuilder.Add(UnusedValuePreferenceKey, preference.ToString()); 178propertiesBuilder.Add(IsUnusedLocalAssignmentKey, string.Empty); 183propertiesBuilder.Add(IsRemovableAssignmentKey, string.Empty); 186builder.Add((preference, isUnusedLocalAssignment, isRemovableAssignment), propertiesBuilder.ToImmutable());
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
67builder.Add(project, diagnostics);
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Features\CodeFixes\CodeFixService.cs (1)
945priorityMap.Add(fixer, i);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (1)
491locals.Add(documentId, diagnostics);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (3)
142builder.Add(FileContentLoadAnalyzer.Instance, new StateSet(language, FileContentLoadAnalyzer.Instance)); 143builder.Add(GeneratorDiagnosticsPlaceholderAnalyzer.Instance, new StateSet(language, GeneratorDiagnosticsPlaceholderAnalyzer.Instance)); 161builder.Add(analyzer, new StateSet(language, analyzer));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (2)
50builder.Add(LanguageNames.VisualBasic, ImmutableArray.Create(DiagnosticExtensions.GetCompilerDiagnosticAnalyzer(LanguageNames.VisualBasic))); 51builder.Add(InternalLanguageNames.TypeScript, ImmutableArray.Create<DiagnosticAnalyzer>(new MockTypescriptDiagnosticAnalyzer()));
Microsoft.CodeAnalysis.Test.Utilities (4)
Diagnostics\DiagnosticExtensions.cs (4)
404builder.Add(LanguageNames.CSharp, ImmutableArray.Create(GetCompilerDiagnosticAnalyzer(LanguageNames.CSharp))); 405builder.Add(LanguageNames.VisualBasic, ImmutableArray.Create(GetCompilerDiagnosticAnalyzer(LanguageNames.VisualBasic))); 418builder.Add(LanguageNames.CSharp, ImmutableArray.Create(GetCompilerDiagnosticAnalyzerReference(LanguageNames.CSharp))); 419builder.Add(LanguageNames.VisualBasic, ImmutableArray.Create(GetCompilerDiagnosticAnalyzerReference(LanguageNames.VisualBasic)));
Microsoft.CodeAnalysis.Workspaces (17)
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (1)
99projectsAndDiagnostics.Add(project, diagnostics);
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (1)
142builder.Add(document, diagnosticsForDocument.ToImmutableArray());
Diagnostics\AbstractDiagnosticPropertiesService.cs (2)
32result.Add( 39result.Add(
Diagnostics\Extensions.cs (1)
223builder.Add(analyzer, result);
Diagnostics\HostDiagnosticAnalyzers.cs (5)
114builder.Add(displayName, descriptors); 174builder.Add(referenceId, descriptors.ToImmutable()); 196builder.Add(referenceIdentity, analyzers); 234builder.Add(reference.Key, analyzers.WhereNotNull().ToImmutableArray()); 273builder.Add(key, reference);
Serialization\SerializerService.cs (2)
225options.Add(key, value); 228optionsByLanguage.Add(language, StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(options.ToImmutable())));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\LValueFlowCaptureProvider.cs (1)
64lvalueFlowCaptureIdBuilder.Add(flowCaptureReference.Id, captureKind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (2)
135builder.Add(namingStyle.ID, name); 164builder.Add(rule, $"{serializedNameMap[rule.SymbolSpecificationID]}_should_be_{serializedNameMap[rule.NamingStyleID]}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
66builder.Add(alias.Target, alias);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
50result.Add(key, items.ToImmutableAndFree());
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
FileSet.cs (1)
30builder.Add(fileName, fileContent);
Microsoft.Interop.ComInterfaceGenerator (6)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (2)
138properties.Add(AnalyzerDiagnostics.Metadata.MayRequireAdditionalWork, mayRequireAdditionalWork.ToString()); 139properties.Add(AnalyzerDiagnostics.Metadata.AddStringMarshalling, hasStrings.ToString());
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (2)
49optionsBuilder.Add(Option.MayRequireAdditionalWork, new Option.Bool(true)); 53optionsBuilder.Add(AddStringMarshallingOption, new Option.Bool(true));
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
75options.Add(optionKeyAndValue[0], new Bool(bool.Parse(value))); 79options.Add(optionKeyAndValue[0], new String(value));
Microsoft.Interop.LibraryImportGenerator (9)
Analyzers\ConvertToLibraryImportAnalyzer.cs (3)
85properties.Add(CharSet, dllImportData.CharacterSet.ToString()); 86properties.Add(ExactSpelling, dllImportData.ExactSpelling.ToString()); 87properties.Add(MayRequireAdditionalWork, mayRequireAdditionalWork.ToString());
Analyzers\ConvertToLibraryImportFixer.cs (2)
62optionsBuilder.Add(Option.MayRequireAdditionalWork, new Option.Bool(true)); 66optionsBuilder.Add(CharSetOption, new Option.String(diagnostic.Properties[ConvertToLibraryImportAnalyzer.CharSet]));
Analyzers\CustomMarshallerAttributeAnalyzer.cs (2)
36builder.Add(MarshalModeKey, mode.ToString()); 37builder.Add(Key, string.Join(Delimiter.ToString(), missingMemberNames));
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
75options.Add(optionKeyAndValue[0], new Bool(bool.Parse(value))); 79options.Add(optionKeyAndValue[0], new String(value));
Microsoft.Interop.SourceGeneration (1)
UseSiteAttributeProvider.cs (1)
50useSiteAttributesByIndirectionDepth.Add(indirectionDepth, useSiteAttributeData);
System.Collections.Immutable (2)
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (2)
288this.Add((TKey)key, (TValue)value!); 611this.Add(item.Key, item.Value);