Implemented interface member:
396 references to Add
AnalyzerRunner (1)
Options.cs (1)
193incrementalAnalyzerNames.Add(ReadValue());
Aspire.Dashboard (1)
Model\ResourceViewModelExtensions.cs (1)
88builder.Add(elementString);
Aspire.Hosting (8)
ApplicationModel\ResourceNotificationService.cs (1)
411builder.Add(CreateCommandFromAnnotation(annotation, previousState, _serviceProvider));
Dcp\ApplicationExecutor.cs (5)
651ports.Add(port.ContainerPort.Value); 773urls.Add(new(Name: ep.EndpointName, Url: url, IsInternal: false)); 780urls.Add(new(Name: ep.EndpointName, Url: ep.Url, IsInternal: false)); 787urls.Add(new(Name: $"{ep.EndpointName} target port", Url: endpointString, IsInternal: true)); 820environment.Add(new(env.Name, env.Value ?? "", isFromSpec));
Dcp\DcpNameGenerator.cs (1)
52builder.Add(new DcpInstance(name, suffix, i));
Health\ResourceHealthCheckService.cs (1)
181builder.Add(snapshot);
ConfigurationSchemaGenerator (1)
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (1)
172builder.Add(item);
DesignSurfaceExt (1)
TypeDiscoveryService.cs (1)
47builder.Add(type);
illink (5)
ILLink.CodeFixProvider (23)
DynamicallyAccessedMembersCodeFixProvider.cs (23)
29 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchParameterTargetsParameter)); 30 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchParameterTargetsMethodReturnType)); 31 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchParameterTargetsField)); 32 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchParameterTargetsThisParameter)); 34 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsParameter)); 35 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsMethodReturnType)); 36 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsField)); 37 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsThisParameter)); 39 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchFieldTargetsParameter)); 40 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchFieldTargetsMethodReturnType)); 41 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchFieldTargetsField)); 42 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchFieldTargetsThisParameter)); 44 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchThisParameterTargetsParameter)); 45 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchThisParameterTargetsMethodReturnType)); 46 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchThisParameterTargetsField)); 47 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchThisParameterTargetsThisParameter)); 49 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchTypeArgumentTargetsParameter)); 50 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchTypeArgumentTargetsMethodReturnType)); 51 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchTypeArgumentTargetsField)); 52 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchTypeArgumentTargetsThisParameter)); 53 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchTypeArgumentTargetsGenericParameter)); 54 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchOnMethodParameterBetweenOverrides)); 55 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchOnMethodReturnValueBetweenOverrides));
ILLink.RoslynAnalyzer (40)
CompilationExtensions.cs (1)
150 builder.Add (item);
DataFlow\ControlFlowGraphProxy.cs (1)
65 finallyRegions.Add (new RegionProxy (region));
DataFlow\LocalDataFlowVisitor.cs (6)
279 arguments.Add (Visit (val, state)); 280 arguments.Add (value); 303 argumentsBuilder.Add (indexArgumentValue); 304 argumentsBuilder.Add (value); 616 arguments.Add (Visit (val, state)); 817 argumentsBuilder.Add (VisitArgument (argument, state));
DynamicallyAccessedMembersAnalyzer.cs (26)
36 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresUnreferencedCode)); 37 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersIsNotAllowedOnMethods)); 40 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersOnMethodReturnValueCanOnlyApplyToTypesOrStrings)); 41 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersFieldAccessedViaReflection)); 42 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMethodAccessedViaReflection)); 43 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersOnTypeReferencesMemberWithRequiresUnreferencedCode)); 44 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersOnTypeReferencesMemberOnBaseWithRequiresUnreferencedCode)); 45 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersOnTypeReferencesMemberWithDynamicallyAccessedMembers)); 46 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersOnTypeReferencesMemberOnBaseWithDynamicallyAccessedMembers)); 47 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.UnrecognizedTypeInRuntimeHelpersRunClassConstructor)); 48 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchOnMethodReturnValueBetweenOverrides)); 49 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchOnMethodParameterBetweenOverrides)); 50 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchOnGenericParameterBetweenOverrides)); 51 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersMismatchOnImplicitThisBetweenOverrides)); 52 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.DynamicallyAccessedMembersConflictsBetweenPropertyAndAccessor)); 53 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.PropertyAccessorParameterInLinqExpressionsCannotBeStaticallyDetermined)); 54 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.MakeGenericType)); 55 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.MakeGenericMethod)); 56 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.CaseInsensitiveTypeGetTypeCallIsNotSupported)); 57 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.UnrecognizedTypeNameInTypeGetType)); 58 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.UnrecognizedParameterInMethodCreateInstance)); 59 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.ParametersOfAssemblyCreateInstanceCannotBeAnalyzed)); 60 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.ReturnValueDoesNotMatchFeatureGuards)); 61 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.InvalidFeatureGuard)); 65 diagDescriptorsArrayBuilder.Add (diagnosticDescriptor); 76 diagDescriptorsArrayBuilder.Add (DiagnosticDescriptors.GetDiagnosticDescriptor ((DiagnosticId) i));
ImmutableArrayOperations.cs (1)
41 properties.Add (p);
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (1)
1362 builder.Add (_annotations.GetGenericParameterValue (genericParameter));
TrimAnalysis\MethodProxy.cs (1)
43 builder.Add (new GenericParameterProxy (typeParameter));
TrimAnalysis\TrimAnalysisMethodCallPattern.cs (2)
39 builder.Add (argument.DeepCopy ()); 60 argumentsBuilder.Add (lattice.Meet (Arguments[i], other.Arguments[i]));
TrimAnalysis\TypeProxy.cs (1)
22 builder.Add (new GenericParameterProxy (typeParameter));
Microsoft.AspNetCore.Analyzers (4)
MiddlewareAnalyzer.cs (1)
38middleware.Add(new MiddlewareItem(invocation));
OptionsAnalyzer.cs (1)
33options.Add(new OptionsItem(property.Property, operation.Value.ConstantValue.Value));
ServicesAnalyzer.cs (1)
33services.Add(new ServicesItem(invocation));
StartupAnalysis.cs (1)
48items.Add(item);
Microsoft.AspNetCore.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
56references.Add(MetadataReference.CreateFromFile(assemblyPath));
Microsoft.AspNetCore.App.Analyzers (22)
Infrastructure\RoutePattern\RoutePatternParser.cs (12)
258policies.Add(parameterPart.Node.ToString()); 354result.Add(ParseRootPart()); 374result.Add(ParsePart()); 509parts.Add(new RoutePatternCatchAllParameterPartNode(asterisksToken)); 514parts.Add(new RoutePatternCatchAllParameterPartNode(firstAsteriskToken)); 523parts.Add(new RoutePatternNameParameterPartNode(parameterName.Value)); 529parts.Add(new RoutePatternNameParameterPartNode( 543parts.Add(ParsePolicy()); 546parts.Add(new RoutePatternOptionalParameterPartNode(ConsumeCurrentToken())); 549parts.Add(ParseDefaultValue()); 591fragments.Add(new RoutePatternPolicyFragmentEscapedNode( 607fragments.Add(new RoutePatternPolicyFragment(policyFragment.Value));
Mvc\MvcAnalyzer.cs (1)
135httpMethodsBuilder.Add(method);
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (2)
421builder.Add(identifer.ValueText); 441builder.Add(identifer.ValueText);
RouteEmbeddedLanguage\Infrastructure\RoutePatternParametersDetector.cs (1)
37resolvedParameterSymbols.Add(new ParameterSymbol(routeParameterName, child, topLevelSymbol));
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (5)
163httpMethodsBuilder.Add("GET"); 166httpMethodsBuilder.Add("POST"); 169httpMethodsBuilder.Add("PUT"); 172httpMethodsBuilder.Add("DELETE"); 175httpMethodsBuilder.Add("PATCH");
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (1)
53highlightSpans.Add(new AspNetCoreHighlightSpan(node.GetSpan(), AspNetCoreHighlightSpanKind.Reference));
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\Converters\CollectionAdapters\ImmutableArrayBufferAdapter.cs (1)
14buffer.Add(element);
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableArrayBufferAdapter.cs (1)
14buffer.Add(element);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (2)
26builder.Add(sourceToElementTransform(value)); 33result.Add((entry.Key, index, entry.Value.ToImmutable()));
Microsoft.Build (6)
BuildCheck\Infrastructure\EditorConfig\EditorConfigFile.cs (1)
137namedSectionBuilder.Add(previousSection);
Evaluation\LazyItemEvaluator.IncludeOperation.cs (2)
89itemsToAdd.Add(_itemFactory.CreateItem(value, value, _itemElement.ContainingProject.FullPath)); 132itemsToAdd.Add(_itemFactory.CreateItem(includeSplitFileEscaped, glob, _itemElement.ContainingProject.FullPath));
Globbing\CompositeGlob.cs (3)
129builder.Add(first); 130builder.Add(enumerator.Current); 134builder.Add(enumerator.Current);
Microsoft.CodeAnalysis (30)
AssemblyUtilities.cs (2)
41builder.Add(satelliteAssemblyPath); 47builder.Add(satelliteAssemblyPath);
CodeGen\LocalScopeManager.cs (6)
335_nestedScopes.Add(scope); 348_localVariables.Add(variable); 360_localConstants.Add(constant); 371_stateMachineUserHoistedLocalSlotIndices.Add(slotIndex); 412Blocks.Add(block); 705_handlers.Add(handler);
CommandLine\AnalyzerConfig.cs (1)
277namedSectionBuilder.Add(previousSection);
CommandLine\CommonCompiler.cs (1)
475embeddedTextBuilder.Add(text);
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1223builder.Add(diagnostic);
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
410builder.Add(analyzer);
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
207builder.Add(d);
MemberDescriptor.cs (7)
154builder.Add(new MemberDescriptor(flags, declaringTypeId, nameTable[i], signatureBuilder.ToImmutable(), arity)); 183builder.Add((byte)paramCount); 200builder.Add((byte)typeCode); 213builder.Add((byte)stream.ReadByte()); 242builder.Add(firstByte); 247builder.Add(secondByte); 257builder.Add((byte)argumentCount);
MetadataReader\PEModule.cs (1)
446builder.Add(new EmbeddedResource((uint)resource.Offset, resource.Attributes, resourceName));
MetadataReference\AssemblyMetadata.cs (2)
331moduleBuilder.Add(_initialModules[0]); 335moduleBuilder.Add(_moduleFactoryOpt(moduleName));
RuleSet\RuleSet.cs (1)
202arrayBuilder.Add(this.FilePath);
RuleSet\RuleSetProcessor.cs (1)
132includes.Add(ReadRuleSetInclude(childNode));
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (1)
145builder.Add((tree, info));
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
156_builder.Add(default!); 161_builder.Add(value); 171_builder.Add(item); 568_builder.Add(selector(item));
Microsoft.CodeAnalysis.CodeStyle (14)
src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (4)
86customTagsBuilder.Add(enforceOnBuild.ToCustomTag()); 90customTagsBuilder.Add(WellKnownDiagnosticTags.NotConfigurable); 94customTagsBuilder.Add(WellKnownDiagnosticTags.CustomSeverityConfigurable); 99customTagsBuilder.Add(WellKnownDiagnosticTags.Unnecessary);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
156_builder.Add(default!); 161_builder.Add(value); 171_builder.Add(item); 568_builder.Add(selector(item));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (3)
126optionsBuilder.Add(option); 138optionsBuilder.Add(option); 150optionsBuilder.Add(option);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
147nodes.Add(new Node(builderNode.CharacterSpan, edgeCount, currentEdgeIndex)); 156edges.Add(_compactEdges[j]); 166edges.Add(new Edge(distance, childIndex));
Microsoft.CodeAnalysis.CSharp (2)
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
855builder.Add(PEParameterSymbol.Create( 948ownedParams.Add(new PETypeParameterSymbol(moduleSymbol, this, (ushort)i, gpHandles[i]));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
LanguageServer\CSharpLspBuildOnlyDiagnosticsTests.cs (1)
32builder.Add("CS" + errorCodeD4String);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenCapturing.cs (1)
38fieldsBuilder.Add($"field_{i}");
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Diagnostics\DiagnosticAnalyzerTests.cs (8)
1479builder.Add(tree); 1481builder.Add(tree); 1487builder.Add(tree); 1497builder.Add(tree); 1507builder.Add(tree); 1515builder.Add(tree); 1521builder.Add(tree); 1527builder.Add(tree);
Microsoft.CodeAnalysis.CSharp.Features (3)
ChangeSignature\CSharpChangeSignatureService.cs (1)
758result.Add(index < oldArguments.Count
SplitOrMergeIfStatements\CSharpIfLikeStatementGenerator.cs (2)
94builder.Add(elseIfStatement); 100builder.Add(ifStatement.Else);
Microsoft.CodeAnalysis.EditorFeatures (2)
FindUsages\BufferedFindUsagesContext.cs (1)
198_state.Definitions.Add(definition);
IntelliSense\AsyncCompletion\FilterSet.cs (1)
111arrayBuilder.Add(filterWithMask);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.Portable.cs (1)
458builder.Add((b & i) != 0);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (10)
CSharp\MemberSignatureParser.cs (4)
25builder.Add(token); 108builder.Add(name); 179builder.Add(name); 268builder.Add(new ParameterSignature(parameterType, isByRef));
MetadataDecoder.cs (2)
43builder.Add(DecodeParameter(ref signatureReader)); 180builder.Add(typeArg);
VisualBasic\MemberSignatureParser.cs (4)
29builder.Add(token); 127builder.Add(name); 205builder.Add(name); 308builder.Add(new ParameterSignature(parameterType, isByRef: modifier == ParameterModifier.ByRef));
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
FunctionResolverTestBase.cs (1)
207builder.Add(reader.GetString(typeParameter.Name));
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (1)
62dummyDescriptors.Add(new DiagnosticDescriptor(String.Format("FS{0:D4}", i), String.Empty, String.Empty, String.Empty, DiagnosticSeverity.Error, true, null, null));
Microsoft.CodeAnalysis.Features (26)
ChangeSignature\AbstractChangeSignatureService.cs (6)
709newParameters.Add(param); 725newParameters.Add(newParameter); 982updatedLeadingTrivia.Add(trivia); 989updatedLeadingTrivia.Add(trivia); 1019updatedLeadingTrivia.Add(newTrivia); 1037updatedLeadingTrivia.Add(newTrivia);
Common\GlyphExtensions.cs (1)
23builder.Add(glyph);
Completion\CommonCompletionItem.cs (1)
90builder.Add(new TaggedText(parts[i], parts[i + 1]));
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (10)
105Builder.Add(new TaggedText(TextTags.Text, NormalizeLineEndings(s), Style, NavigationTarget.target, NavigationTarget.hint)); 144Builder.Add(new TaggedText(TextTags.ContainerEnd, string.Empty)); 161Builder.Add(new TaggedText(TextTags.ContainerEnd, string.Empty)); 224Builder.Add(s_newlinePart); 225Builder.Add(s_newlinePart); 229Builder.Add(s_newlinePart); 233Builder.Add(s_spacePart); 250Builder.Add(new TaggedText(TextTags.ContainerStart, "• ")); 254Builder.Add(new TaggedText(TextTags.ContainerStart, $"{_listStack[i].index}. ")); 260Builder.Add(new TaggedText(TextTags.ContainerStart, string.Empty));
src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (4)
86customTagsBuilder.Add(enforceOnBuild.ToCustomTag()); 90customTagsBuilder.Add(WellKnownDiagnosticTags.NotConfigurable); 94customTagsBuilder.Add(WellKnownDiagnosticTags.CustomSeverityConfigurable); 99customTagsBuilder.Add(WellKnownDiagnosticTags.Unnecessary);
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
149compilationAssemblies.Add(Path.GetFullPath(Path.Combine(packagesPath, library.Path ?? "", assemblyPath)));
UnusedReferences\UnusedReferencesRemover.cs (3)
156unusedReferencesBuilder.Add(reference); 171unusedReferencesBuilder.Add(reference); 214unusedReferencesBuilder.Add(reference);
Microsoft.CodeAnalysis.InteractiveHost (6)
Interactive\Core\InteractiveHost.Service.cs (2)
510metadataReferencePaths.Add(typeof(object).Assembly.Location); 511metadataReferencePaths.Add(typeof(InteractiveScriptGlobals).Assembly.Location);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
156_builder.Add(default!); 161_builder.Add(value); 171_builder.Add(item); 568_builder.Add(selector(item));
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (2)
59watchedDirectoriesBuilder.Add(watchedDirectory); 60watcherBuilder.Add(watcher);
Microsoft.CodeAnalysis.LanguageServer.Protocol (11)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (1)
185builder.Add(set);
Features\FindUsages\SimpleFindUsagesContext.cs (2)
63_definitionItems.Add(definition); 75_referenceItems.Add(reference);
RoslynLanguageServer.cs (3)
145builder.Add(existingService); 146builder.Add(baseService); 153existingBuilder.Add(baseService);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\MethodHandlerDetails.cs (5)
42builder.Add(new( 73builder.Add((RequestType: genericArguments[0], ResponseType: genericArguments[1], RequestContextType: genericArguments[2])); 78builder.Add((RequestType: null, ResponseType: genericArguments[0], RequestContextType: genericArguments[1])); 83builder.Add((RequestType: genericArguments[0], ResponseType: null, RequestContextType: genericArguments[1])); 88builder.Add((RequestType: null, ResponseType: null, RequestContextType: genericArguments[0]));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (6)
Completion\CompletionFeaturesTests.cs (5)
603builder.Add(CodeAnalysis.Completion.CompletionItem.Create($"ItemWithDefaultChar{i}", rules: CompletionItemRules.Default)); 606builder.Add(CodeAnalysis.Completion.CompletionItem.Create($"ItemNonDefaultChar{i}", rules: NonDefaultRule)); 931builder.Add(CodeAnalysis.Completion.CompletionItem.Create("SimpleItem")); 935builder.Add(importItem); 937builder.Add(CodeAnalysis.Completion.CompletionItem.Create("ComplexItem", isComplexTextEdit: true));
SemanticTokens\AbstractSemanticTokensTests.cs (1)
126convertedStringsBuilder.Add($"{data[i]}, {data[i + 1]}, {data[i + 2]}, {kind}, {data[i + 4]}");
Microsoft.CodeAnalysis.PooledObjects.Package (4)
ArrayBuilder.cs (4)
156_builder.Add(default!); 161_builder.Add(value); 171_builder.Add(item); 568_builder.Add(selector(item));
Microsoft.CodeAnalysis.Rebuild (2)
CompilationOptionsReader.cs (2)
316builder.Add(syntaxTree); 341builder.Add(metadataReference);
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteWorkspace.SolutionCreator.cs (1)
512lazyDocumentsToRemove.Add(documentId);
Microsoft.CodeAnalysis.Scripting (2)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (2)
466moduleBuilder.Add(manifestModule); 475moduleBuilder.Add(CreateModuleMetadata(moduleCopyStream));
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2194builder.Add(descriptor);
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\VisualBasicCompilerDiagnosticAnalyzer.vb (1)
32builder.Add(errorCode)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (1)
195DiagnosticsBuilder.Add(diagnostic)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Diagnostics\DiagnosticAnalyzerTests.vb (4)
858builder.Add(tree) 862builder.Add(tree) 868builder.Add(tree) 877builder.Add(tree)
Microsoft.CodeAnalysis.Workspaces (18)
Shared\Utilities\DocumentationComment.cs (4)
260(_parameterNamesBuilder ??= ImmutableArray.CreateBuilder<string>()).Add(name); 271(_typeParameterNamesBuilder ??= ImmutableArray.CreateBuilder<string>()).Add(name); 284(_exceptionTypesBuilder ??= ImmutableArray.CreateBuilder<string>()).Add(type); 288_exceptionTextBuilders[type].Add(exceptionText);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
156_builder.Add(default!); 161_builder.Add(value); 171_builder.Add(item); 568_builder.Add(selector(item));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (3)
126optionsBuilder.Add(option); 138optionsBuilder.Add(option); 150optionsBuilder.Add(option);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
147nodes.Add(new Node(builderNode.CharacterSpan, edgeCount, currentEdgeIndex)); 156edges.Add(_compactEdges[j]); 166edges.Add(new Edge(distance, childIndex));
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (3)
119_documentsAddedInBatch.Add(documentInfo); 177_documentsAddedInBatch.Add(documentInfo); 224_documentsAddedInBatch.Add(documentInfo);
Workspace\Solution\ProjectDependencyGraph_AddProject.cs (1)
31builder.Add(ImmutableArray.Create(projectId));
Microsoft.CodeAnalysis.Workspaces.MSBuild (5)
MSBuild\MSBuildProjectLoader.cs (1)
211projectPaths.Add(project.RelativePath);
MSBuild\MSBuildProjectLoader.Worker.cs (2)
209results.Add(projectFileInfo); 263builder.Add(projectInfo);
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (2)
153builder.Add(unresolvedMetadataReference); 172builder.Add(reference);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (8)
BuildHost.cs (1)
154builder.Add((project.AbsolutePath, project.ProjectGuid));
MSBuild\ProjectFile\CommandLineArgumentReader.cs (3)
39_builder.Add($"/{name}"); 48_builder.Add($"/{name}:\"{value}\""); 52_builder.Add($"/{name}:{value}");
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
156_builder.Add(default!); 161_builder.Add(value); 171_builder.Add(item); 568_builder.Add(selector(item));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Formatting\FormattingTestBase.cs (1)
114outputBuilder.Add(TextSpan.FromBounds(0, outputText.Length));
Microsoft.CommonLanguageServerProtocol.Framework.Package (5)
MethodHandlerDetails.cs (5)
42builder.Add(new( 73builder.Add((RequestType: genericArguments[0], ResponseType: genericArguments[1], RequestContextType: genericArguments[2])); 78builder.Add((RequestType: null, ResponseType: genericArguments[0], RequestContextType: genericArguments[1])); 83builder.Add((RequestType: genericArguments[0], ResponseType: null, RequestContextType: genericArguments[1])); 88builder.Add((RequestType: null, ResponseType: null, RequestContextType: genericArguments[0]));
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
172builder.Add(item);
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
172builder.Add(item);
Microsoft.Gen.Logging (1)
src\Generators\Shared\RoslynExtensions.cs (1)
125builder.Add(item);
Microsoft.Gen.Metrics (1)
src\Generators\Shared\RoslynExtensions.cs (1)
125builder.Add(item);
Microsoft.Interop.ComInterfaceGenerator (18)
ComClassInfo.cs (1)
51names.Add(iface.ToDisplayString());
ComInterfaceContext.cs (1)
42accumulator.Add(AddContext(iface));
ComInterfaceGenerator.cs (2)
462methodList.Add(methods[methodIndex++]); 464contextList.Add(new(iface, methodList.ToImmutable().ToSequenceEqual()));
ComInterfaceInfo.cs (1)
124nonFatalDiagnostics.Add(DiagnosticInfo.Create(
ComMethodInfo.cs (4)
53methods.Add(DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(member.CreateDiagnosticInfo(GeneratorDiagnostics.InstancePropertyDeclaredInInterface, member.Name, data.ifaceSymbol.ToDisplayString()))); 56methods.Add(DiagnosticOr<(ComMethodInfo, IMethodSymbol)>.From(member.CreateDiagnosticInfo(GeneratorDiagnostics.InstanceEventDeclaredInInterface, member.Name, data.ifaceSymbol.ToDisplayString()))); 59methods.Add(CalculateMethodInfo(data.ifaceContext, (IMethodSymbol)member, ct)); 148attributeInfos.Add(AttributeInfo.From(attr));
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
172builder.Add(item);
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
64projectsWithDiagnostics.Add(project);
VirtualMethodPointerStubGenerator.cs (7)
183elements.Add(new TypePositionInfo(new PointerTypeInfo("void*", "void*", false), methodStub.ManagedThisMarshallingInfo) 190elements.Add(element with 205elements.Add(new TypePositionInfo(methodStub.TypeKeyOwner, methodStub.ManagedThisMarshallingInfo) 212elements.Add(element with 220elements.Add( 293callingConventions.Add(FunctionPointerUnmanagedCallingConvention(Identifier("SuppressGCTransition"))); 308callingConventions.Add(FunctionPointerUnmanagedCallingConvention(Identifier(callConvSymbol.Name.Substring("CallConv".Length))));
Microsoft.Interop.LibraryImportGenerator (2)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
172builder.Add(item);
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
64projectsWithDiagnostics.Add(project);
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
172builder.Add(item);
Microsoft.Interop.SourceGeneration (18)
BoundGenerators.cs (3)
48signatureMarshallers.Add(generator); 61managedParamMarshallers.Add(generator); 65nativeParamMarshallers.Add(generator);
ContainingSyntaxContext.cs (1)
55containingTypeInfoBuilder.Add(
IncrementalValuesProviderExtensions.cs (1)
26builder.Add((data.Left[i], data.Right[i]));
SignatureContext.cs (4)
69additionalAttrs.Add( 84additionalAttrs.Add( 119typeInfos.Add(typeInfo); 129typeInfos.Add(retTypeInfo);
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
172builder.Add(item);
VariableDeclarations.cs (8)
29initializations.Add(MarshallerHelpers.DefaultInit(info, context)); 62statementsToUpdate.Add(Declare( 71statementsToUpdate.Add(Declare( 122statementsToUpdate.Add(Declare( 129statementsToUpdate.Add(Declare( 149statementsToUpdate.Add(Declare( 160statementsToUpdate.Add(Declare( 169statementsToUpdate.Add(Declare(
Microsoft.ML.Transforms (2)
Text\LdaTransform.cs (2)
350itemScoresPerTopicBuilder.Add(itemScores); 367wordScoresPerTopicBuilder.Add(wordScores);
Microsoft.VisualStudio.LanguageServices (28)
Interactive\VsResetInteractive.cs (6)
134referenceSearchPathsBuilder.Add(outputDir); 135referenceSearchPathsBuilder.Add(RuntimeEnvironment.GetRuntimeDirectory()); 142referencesBuilder.Add(str); 146referencesBuilder.Add(outputFileName); 149sourceSearchPathsBuilder.Add(Directory.Exists(scriptsDir) ? scriptsDir : projectDir); 153namespacesToImportBuilder.Add(defaultNamespace);
Library\ObjectBrowser\AbstractListItemFactory.cs (16)
200builder.Add(listItemCreator(symbol, projectId, isHidden)); 217symbolBuilder.Add(namedTypeSymbol.BaseType); 222symbolBuilder.Add(interfaceSymbol); 258builder.Add(new FolderListItem(parentListItem.ProjectId, ServicesVSResources.Project_References)); 282builder.Add(new FolderListItem(parentListItem.ProjectId, ServicesVSResources.Base_Types)); 324symbolBuilder.Add(member); 421builder.Add(namespaceListItem); 425builder.Add(namespaceListItem); 559builder.Add(typeMember); 612projectListItemBuilder.Add(new ProjectListItem(project)); 628referenceListItemBuilder.Add(referenceListItem); 713finalBuilder.Add(listItem); 761builder.Add(typeListItem); 765builder.Add(typeListItem); 796builder.Add(memberListItem); 800builder.Add(memberListItem);
Library\VsNavInfo\Extensions.cs (1)
53builder.Add(new NavInfoNode(name, type));
Library\VsNavInfo\NavInfo.cs (1)
108builder.Add(baseNodes[i]);
PullMemberUp\WarningDialog\PullMemberUpWarningViewModel.cs (3)
31warningMessagesBuilder.Add(string.Format(ServicesVSResources._0_will_be_changed_to_abstract, options.Destination.Name)); 39warningMessagesBuilder.Add(string.Format(ServicesVSResources._0_will_be_changed_to_public, result.Member.Name)); 45warningMessagesBuilder.Add(string.Format(ServicesVSResources._0_will_be_changed_to_non_static, result.Member.Name));
Snippets\AbstractSnippetInfoService.cs (1)
201snippetListBuilder.Add(new SnippetInfo(snippetInfo.shortcut, snippetInfo.title, snippetInfo.description, snippetInfo.path));
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\Projects\RoslynRemoteProjectInfoProvider.cs (1)
81projectInfos.Add(projectInfo);
Mvc.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
56references.Add(MetadataReference.CreateFromFile(assemblyPath));
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
356this.Add(item);
System.Reflection.Metadata (23)
System\Reflection\Metadata\Ecma335\CustomAttributeDecoder.cs (3)
114arguments.Add(DecodeArgument(ref valueReader, info)); 140arguments.Add(new CustomAttributeNamedArgument<TType>(name, kind, argument.Type, argument.Value)); 408array.Add(DecodeArgument(ref blobReader, elementInfo));
System\Reflection\Metadata\Ecma335\SignatureDecoder.cs (5)
152types.Add(DecodeType(ref blobReader)); 197parameterBuilder.Add(DecodeType(ref blobReader, allowTypeSpecifications: false, typeCode: typeCode)); 203parameterBuilder.Add(DecodeType(ref blobReader)); 263builder.Add(blobReader.ReadCompressedInteger()); 274builder.Add(blobReader.ReadCompressedSignedInteger());
System\Reflection\Metadata\Internal\NamespaceCache.cs (5)
236parent.Namespaces!.Add(child.Handle); 341builder.TypeDefinitions!.Add(typeHandle); 348newData.TypeDefinitions!.Add(typeHandle); 373builder.ExportedTypes!.Add(exportedTypeHandle); 381newData.ExportedTypes!.Add(exportedTypeHandle);
System\Reflection\Metadata\MetadataReader.cs (1)
1446builder.Add(NestedClassTable.GetNestedClass(i));
System\Reflection\Metadata\TypeNameParser.cs (1)
128genericArgs.Add(genericArg);
System\Reflection\Metadata\TypeSystem\EventDefinition.cs (1)
89other.Add(_reader.MethodSemanticsTable.GetMethod(rowId));
System\Reflection\Metadata\TypeSystem\PropertyDefinition.cs (1)
96other.Add(_reader.MethodSemanticsTable.GetMethod(rowId));
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (3)
97builder.Add(new Section(TextSectionName, SectionCharacteristics.MemRead | SectionCharacteristics.MemExecute | SectionCharacteristics.ContainsCode)); 101builder.Add(new Section(ResourceSectionName, SectionCharacteristics.MemRead | SectionCharacteristics.ContainsInitializedData)); 106builder.Add(new Section(RelocationSectionName, SectionCharacteristics.MemRead | SectionCharacteristics.MemDiscardable | SectionCharacteristics.ContainsInitializedData));
System\Reflection\PortableExecutable\PEBuilder.cs (1)
144result.Add(serialized);
System\Reflection\PortableExecutable\PEHeaders.cs (1)
305builder.Add(new SectionHeader(ref reader));
System\Reflection\PortableExecutable\PEReader.cs (1)
587builder.Add(new DebugDirectoryEntry(stamp, majorVersion, minorVersion, type, dataSize, dataRva, dataPointer));
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
172builder.Add(item);
System.Text.RegularExpressions.Generator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
172builder.Add(item);