2 instantiations of Builder
System.Collections.Immutable (2)
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (2)
268return new Builder(); // allow the builder to create itself with a reasonable default capacity 271var builder = new Builder(self.Length);
412 references to Builder
AnalyzerRunner (1)
Options.cs (1)
135var incrementalAnalyzerNames = ImmutableArray.CreateBuilder<string>();
Aspire.Dashboard (1)
Model\ResourceViewModelExtensions.cs (1)
78var builder = ImmutableArray.CreateBuilder<string>(value.ListValue.Values.Count);
Aspire.Hosting (7)
ApplicationModel\CustomResourceSnapshot.cs (1)
333var relationships = ImmutableArray.CreateBuilder<RelationshipSnapshot>();
ApplicationModel\ResourceNotificationService.cs (1)
396ImmutableArray<ResourceCommandSnapshot>.Builder? builder = null;
Dcp\ApplicationExecutor.cs (3)
654var ports = ImmutableArray.CreateBuilder<int>(); 741var urls = ImmutableArray.CreateBuilder<UrlSnapshot>(); 829var environment = ImmutableArray.CreateBuilder<EnvironmentVariableSnapshot>(effectiveSource.Count);
Dcp\DcpNameGenerator.cs (1)
48var builder = ImmutableArray.CreateBuilder<DcpInstance>(replicas);
Health\ResourceHealthCheckService.cs (1)
159var builder = healthReports.ToBuilder();
ConfigurationSchemaGenerator (1)
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (1)
170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
CSharpSyntaxGenerator (1)
SourceGenerator.cs (1)
110var sourcesBuilder = ImmutableArray.CreateBuilder<(string hintName, SourceText sourceText)>();
DesignSurfaceExt (1)
TypeDiscoveryService.cs (1)
29var builder = ImmutableArray.CreateBuilder<Type>();
illink (5)
ILLink.CodeFixProvider (1)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
28 var diagDescriptorsArrayBuilder = ImmutableArray.CreateBuilder<DiagnosticDescriptor> ();
ILLink.RoslynAnalyzer (14)
CompilationExtensions.cs (1)
149 var builder = ImmutableArray.CreateBuilder<T> (span.Length);
DataFlow\ControlFlowGraphProxy.cs (1)
60 var finallyRegions = ImmutableArray.CreateBuilder<RegionProxy> ();
DataFlow\LocalDataFlowVisitor.cs (4)
277 ImmutableArray<TValue>.Builder arguments = ImmutableArray.CreateBuilder<TValue> (); 302 var argumentsBuilder = ImmutableArray.CreateBuilder<TValue> (); 614 ImmutableArray<TValue>.Builder arguments = ImmutableArray.CreateBuilder<TValue> (); 808 var argumentsBuilder = ImmutableArray.CreateBuilder<TValue> ();
DynamicallyAccessedMembersAnalyzer.cs (1)
35 var diagDescriptorsArrayBuilder = ImmutableArray.CreateBuilder<DiagnosticDescriptor> (26);
ImmutableArrayOperations.cs (1)
38 internal static void AddIfNotNull<TSymbol> (ImmutableArray<TSymbol>.Builder properties, TSymbol? p) where TSymbol : class, ISymbol
RequiresAssemblyFilesAnalyzer.cs (1)
85 var dangerousPatternsBuilder = ImmutableArray.CreateBuilder<ISymbol> ();
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (1)
1360 var builder = ImmutableArray.CreateBuilder<GenericParameterValue> (genericParameters.Length);
TrimAnalysis\MethodProxy.cs (1)
41 var builder = ImmutableArray.CreateBuilder<GenericParameterProxy> (Method.TypeParameters.Length);
TrimAnalysis\TrimAnalysisMethodCallPattern.cs (2)
37 var builder = ImmutableArray.CreateBuilder<MultiValue> (); 58 var argumentsBuilder = ImmutableArray.CreateBuilder<MultiValue> ();
TrimAnalysis\TypeProxy.cs (1)
20 var builder = ImmutableArray.CreateBuilder<GenericParameterProxy> (namedType.TypeParameters.Length);
Microsoft.AspNetCore.Analyzers (4)
MiddlewareAnalyzer.cs (1)
23var middleware = ImmutableArray.CreateBuilder<MiddlewareItem>();
OptionsAnalyzer.cs (1)
24var options = ImmutableArray.CreateBuilder<OptionsItem>();
ServicesAnalyzer.cs (1)
23var services = ImmutableArray.CreateBuilder<ServicesItem>();
StartupAnalysis.cs (1)
41var items = ImmutableArray.CreateBuilder<T>();
Microsoft.AspNetCore.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
22var references = ImmutableArray.CreateBuilder<MetadataReference>();
Microsoft.AspNetCore.App.Analyzers (12)
Infrastructure\RoutePattern\RoutePatternParser.cs (7)
70var routeParameters = ImmutableArray.CreateBuilder<RouteParameter>(); 72var diagnostics = ImmutableArray.CreateBuilder<EmbeddedDiagnostic>(); 228var policies = ImmutableArray.CreateBuilder<string>(); 350var result = ImmutableArray.CreateBuilder<RoutePatternRootPartNode>(); 369var result = ImmutableArray.CreateBuilder<RoutePatternSegmentPartNode>(); 494var parts = ImmutableArray.CreateBuilder<RoutePatternParameterPartNode>(); 574var fragments = ImmutableArray.CreateBuilder<RoutePatternNode>();
Mvc\MvcAnalyzer.cs (1)
121var httpMethodsBuilder = ImmutableArray.CreateBuilder<string>();
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
411var builder = ImmutableArray.CreateBuilder<string>();
RouteEmbeddedLanguage\Infrastructure\RoutePatternParametersDetector.cs (1)
21var resolvedParameterSymbols = ImmutableArray.CreateBuilder<ParameterSymbol>();
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (1)
158var httpMethodsBuilder = ImmutableArray.CreateBuilder<string>();
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (1)
50var highlightSpans = ImmutableArray.CreateBuilder<AspNetCoreHighlightSpan>();
Microsoft.AspNetCore.Components.Endpoints (6)
FormMapping\Converters\CollectionAdapters\ImmutableArrayBufferAdapter.cs (5)
8internal sealed class ImmutableArrayBufferAdapter<TElement> : ICollectionBufferAdapter<ImmutableArray<TElement>, ImmutableArray<TElement>.Builder, TElement> 10public static ImmutableArray<TElement>.Builder CreateBuffer() => ImmutableArray.CreateBuilder<TElement>(); 12public static ImmutableArray<TElement>.Builder Add(ref ImmutableArray<TElement>.Builder buffer, TElement element) 18public static ImmutableArray<TElement> ToResult(ImmutableArray<TElement>.Builder buffer) => buffer.ToImmutable();
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (1)
150new CollectionConverter<ImmutableArray<TElement>, ImmutableArrayBufferAdapter<TElement>, ImmutableArray<TElement>.Builder, TElement>(elementTypeConverter),
Microsoft.AspNetCore.Http.Extensions (6)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableArrayBufferAdapter.cs (5)
8internal sealed class ImmutableArrayBufferAdapter<TElement> : ICollectionBufferAdapter<ImmutableArray<TElement>, ImmutableArray<TElement>.Builder, TElement> 10public static ImmutableArray<TElement>.Builder CreateBuffer() => ImmutableArray.CreateBuilder<TElement>(); 12public static ImmutableArray<TElement>.Builder Add(ref ImmutableArray<TElement>.Builder buffer, TElement element) 18public static ImmutableArray<TElement> ToResult(ImmutableArray<TElement>.Builder buffer) => buffer.ToImmutable();
src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (1)
150new CollectionConverter<ImmutableArray<TElement>, ImmutableArrayBufferAdapter<TElement>, ImmutableArray<TElement>.Builder, TElement>(elementTypeConverter),
Microsoft.AspNetCore.Http.RequestDelegateGenerator (4)
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (3)
18Dictionary<TSource, ImmutableArray<TElement>.Builder> map = new(comparer); 21if (!map.TryGetValue(value, out ImmutableArray<TElement>.Builder builder)) 28ImmutableArray<(TSource Key, int Index, ImmutableArray<TElement> Elements)>.Builder result =
StaticRouteHandlerModel\EndpointParameter.cs (1)
38var attributeBuilder = ImmutableArray.CreateBuilder<AttributeData>();
Microsoft.Build (5)
BuildCheck\Infrastructure\EditorConfig\EditorConfigFile.cs (1)
69var namedSectionBuilder = ImmutableArray.CreateBuilder<Section>();
BuildCheck\Infrastructure\EditorConfig\EditorConfigGlobsMatcher.cs (1)
120var imArray = ImmutableArray.CreateBuilder<(int, int)>(numberRangePairs is null ? 0 : numberRangePairs.Count);
Evaluation\LazyItemEvaluator.cs (1)
484public readonly ImmutableArray<ProjectMetadataElement>.Builder Metadata = ImmutableArray.CreateBuilder<ProjectMetadataElement>();
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
40ImmutableArray<I>.Builder? itemsToAdd = null;
Globbing\CompositeGlob.cs (1)
127var builder = ImmutableArray.CreateBuilder<IMSBuildGlob>();
Microsoft.CodeAnalysis (65)
AssemblyUtilities.cs (1)
28var builder = ImmutableArray.CreateBuilder<string>();
CodeGen\LocalScopeManager.cs (10)
258protected static ScopeBounds GetLocalScopes<TScopeInfo>(ArrayBuilder<Cci.LocalScope> result, ImmutableArray<TScopeInfo>.Builder scopes) 282protected static ScopeBounds GetHoistedLocalScopes<TScopeInfo>(ArrayBuilder<StateMachineHoistedLocalScope> result, ImmutableArray<TScopeInfo>.Builder scopes) 314private ImmutableArray<LocalDefinition>.Builder _localVariables; 315private ImmutableArray<LocalConstantDefinition>.Builder _localConstants; 316private ImmutableArray<int>.Builder _stateMachineUserHoistedLocalSlotIndices; 320private ImmutableArray<ScopeInfo>.Builder _nestedScopes; 321protected ImmutableArray<BasicBlock>.Builder Blocks; 376var locals = _localVariables; 678private readonly ImmutableArray<ExceptionHandlerScope>.Builder _handlers; 843var handlers = curScope._handlers;
CommandLine\AnalyzerConfig.cs (1)
195var namedSectionBuilder = ImmutableArray.CreateBuilder<Section>();
CommandLine\CommandLineArguments.cs (2)
480var analyzerBuilder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 481var generatorBuilder = ImmutableArray.CreateBuilder<ISourceGenerator>();
CommandLine\CommonCompiler.cs (1)
456var embeddedTextBuilder = ImmutableArray.CreateBuilder<EmbeddedText?>(embeddedFileOrderedSet.Count);
DiagnosticAnalyzer\AnalysisResult.cs (3)
99var builder = ImmutableArray.CreateBuilder<Diagnostic>(); 114ImmutableArray<Diagnostic>.Builder builder) 134ImmutableArray<Diagnostic>.Builder builder)
DiagnosticAnalyzer\AnalysisResultBuilder.cs (27)
36private Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localSemanticDiagnosticsOpt = null; 37private Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localSyntaxDiagnosticsOpt = null; 38private Dictionary<AdditionalText, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localAdditionalFileDiagnosticsOpt = null; 39private Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? _nonLocalDiagnosticsOpt = null; 331ref Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? lazyLocalDiagnostics) 339lazyLocalDiagnostics = lazyLocalDiagnostics ?? new Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>(); 349Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? allDiagnostics; 352allDiagnostics = new Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>(); 356ImmutableArray<Diagnostic>.Builder? analyzerDiagnostics; 374_nonLocalDiagnosticsOpt = _nonLocalDiagnosticsOpt ?? new Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>(); 376ImmutableArray<Diagnostic>.Builder? currentDiagnostics; 386private static void UpdateDiagnosticsCore_NoLock(ImmutableArray<Diagnostic>.Builder currentDiagnostics, IEnumerable<Diagnostic> diagnostics, bool overwrite) 413var builder = ImmutableArray.CreateBuilder<Diagnostic>(); 442Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? lazyLocalDiagnostics, 444ImmutableArray<Diagnostic>.Builder builder) 457Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics, 459ImmutableArray<Diagnostic>.Builder builder) 463Dictionary<AdditionalText, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics, 465ImmutableArray<Diagnostic>.Builder builder) 469Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics, 472ImmutableArray<Diagnostic>.Builder builder) 475Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? diagnosticsForTree; 483Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder> diagnostics, 485ImmutableArray<Diagnostic>.Builder builder) 491ImmutableArray<Diagnostic>.Builder? diagnosticsByAnalyzer; 526Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnosticsOpt) 562Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? nonLocalDiagnosticsOpt)
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1208var builder = ImmutableArray.CreateBuilder<Diagnostic>();
DiagnosticAnalyzer\AnalyzerFileReference.cs (5)
187internal void AddAnalyzers(ImmutableArray<DiagnosticAnalyzer>.Builder builder, string language, Func<DiagnosticAnalyzer, bool>? shouldInclude = null) 195internal void AddGenerators(ImmutableArray<ISourceGenerator>.Builder builder, string language) 405var builder = ImmutableArray.CreateBuilder<TExtension>(); 446var builder = ImmutableArray.CreateBuilder<TExtension>(); 510internal void AddExtensions(ImmutableArray<TExtension>.Builder builder, string language, Func<TExtension, bool>? shouldInclude = null)
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
204var builder = ImmutableArray.CreateBuilder<Diagnostic>();
MemberDescriptor.cs (6)
135var builder = ImmutableArray.CreateBuilder<MemberDescriptor>(count); 136var signatureBuilder = ImmutableArray.CreateBuilder<byte>(); 180private static void ParseMethodOrPropertySignature(ImmutableArray<byte>.Builder builder, Stream stream) 195private static void ParseType(ImmutableArray<byte>.Builder builder, Stream stream, bool allowByRef = false) 239private static void ParseTypeHandle(ImmutableArray<byte>.Builder builder, Stream stream) 251private static void ParseGenericTypeInstance(ImmutableArray<byte>.Builder builder, Stream stream)
MetadataReader\PEModule.cs (1)
439var builder = ImmutableArray.CreateBuilder<EmbeddedResource>();
MetadataReference\AssemblyMetadata.cs (1)
318ImmutableArray<ModuleMetadata>.Builder? moduleBuilder = null;
RuleSet\RuleSet.cs (2)
193var arrayBuilder = ImmutableArray.CreateBuilder<string>(); 200private void GetEffectiveIncludesCore(ImmutableArray<string>.Builder arrayBuilder)
RuleSet\RuleSetProcessor.cs (1)
100var includes = ImmutableArray.CreateBuilder<RuleSetInclude>();
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (1)
138var builder = ImmutableArray.CreateBuilder<(SyntaxTree Tree, SourceGeneratorSyntaxTreeInfo Info)>(count);
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
54private readonly ImmutableArray<T>.Builder _builder;
Microsoft.CodeAnalysis.CodeStyle (13)
src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (1)
83var customTagsBuilder = ImmutableArray.CreateBuilder<string>();
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
54private readonly ImmutableArray<T>.Builder _builder;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (3)
118this ImmutableArray<IOption2>.Builder optionsBuilder, 131this ImmutableArray<IOption2>.Builder optionsBuilder, 143this ImmutableArray<IOption2>.Builder optionsBuilder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
20private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
16private static readonly ImmutableArray<IOption2>.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
43public static ImmutableArray<T> ToImmutableAndClear<T>(this ImmutableArray<T>.Builder builder)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (4)
128var nodes = ImmutableArray.CreateBuilder<Node>(_builderNodes.Length); 132var edges = ImmutableArray.CreateBuilder<Edge>(Math.Max(0, _builderNodes.Length - 1)); 139private void BuildArrays(ImmutableArray<Node>.Builder nodes, ImmutableArray<Edge>.Builder edges)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
226var builder = ImmutableArray.CreateBuilder<byte>(count);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
53var diagnostics = ImmutableArray.CreateBuilder<Diagnostic>();
Microsoft.CodeAnalysis.CSharp (2)
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
852var builder = ImmutableArray.CreateBuilder<ParameterSymbol>(count); 945var ownedParams = ImmutableArray.CreateBuilder<TypeParameterSymbol>(gpHandles.Count);
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (2)
28private ImmutableArray<TextSpan>.Builder? _spans; 34public ImmutableArray<TextSpan>.Builder SpansBuilder
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (3)
221is nameof(ImmutableArray<int>.Builder.ToImmutable) 222or nameof(ImmutableArray<int>.Builder.MoveToImmutable) 223or nameof(ImmutableArray<int>.Builder.ToArray)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
18private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (1)
20private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
277var deduplicatedUsingsBuilder = ImmutableArray.CreateBuilder<UsingDirectiveSyntax>();
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\AbstractBuiltInCodeStyleDiagnosticAnalyzer\AbstractBuiltInCodeStyleDiagnosticAnalyzerTests.cs (1)
37var builder = ImmutableArray.CreateBuilder<(DiagnosticDescriptor, ImmutableHashSet<IOption2>)>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
LanguageServer\CSharpLspBuildOnlyDiagnosticsTests.cs (1)
26var builder = ImmutableArray.CreateBuilder<string>();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenCapturing.cs (1)
35var fieldsBuilder = ImmutableArray.CreateBuilder<string>(MaxVariables);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1474var builder = ImmutableArray.CreateBuilder<SyntaxTree>();
Microsoft.CodeAnalysis.CSharp.Features (10)
ChangeSignature\CSharpChangeSignatureService.cs (1)
754var result = ImmutableArray.CreateBuilder<T>();
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (2)
48private ImmutableArray<Diagnostic>.Builder? _diagnostics; 62public ImmutableArray<Diagnostic>.Builder DiagnosticsBuilder
SplitOrMergeIfStatements\CSharpIfLikeStatementGenerator.cs (1)
90var builder = ImmutableArray.CreateBuilder<SyntaxNode>();
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (2)
28private ImmutableArray<TextSpan>.Builder? _spans; 34public ImmutableArray<TextSpan>.Builder SpansBuilder
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (3)
221is nameof(ImmutableArray<int>.Builder.ToImmutable) 222or nameof(ImmutableArray<int>.Builder.MoveToImmutable) 223or nameof(ImmutableArray<int>.Builder.ToArray)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
277var deduplicatedUsingsBuilder = ImmutableArray.CreateBuilder<UsingDirectiveSyntax>();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
src\Analyzers\CSharp\Tests\AbstractBuiltInCodeStyleDiagnosticAnalyzer\AbstractBuiltInCodeStyleDiagnosticAnalyzerTests.cs (1)
37var builder = ImmutableArray.CreateBuilder<(DiagnosticDescriptor, ImmutableHashSet<IOption2>)>();
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
18private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (1)
20private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
Microsoft.CodeAnalysis.EditorFeatures (2)
FindUsages\BufferedFindUsagesContext.cs (1)
30public ImmutableArray<DefinitionItem>.Builder Definitions = ImmutableArray.CreateBuilder<DefinitionItem>();
IntelliSense\AsyncCompletion\FilterSet.cs (1)
69var arrayBuilder = ImmutableArray.CreateBuilder<FilterWithMask>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EmbeddedLanguages\StackFrame\StackFrameSyntaxFactory.cs (1)
77var builder = ImmutableArray.CreateBuilder<StackFrameNodeOrToken>();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (4)
Lightup\ISmartRenameSessionWrapper.cs (4)
65s_renameContextImmutableListBuilderAddAccessor = LightupHelpers.CreateActionAccessor<object, object>(typeof(ImmutableArray<>.Builder).MakeGenericType(s_wrappedRenameContextType), 66nameof(ImmutableArray<object>.Builder.Add), 68s_renameContextImmutableListBuilderToArrayAccessor = LightupHelpers.CreateFunctionAccessor<object, object>(typeof(ImmutableArray<>.Builder).MakeGenericType(s_wrappedRenameContextType), 69nameof(ImmutableArray<object>.Builder.ToImmutable),
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.Portable.cs (1)
451var builder = ImmutableArray.CreateBuilder<bool>(reader.Length * 8);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (12)
CSharp\MemberSignatureParser.cs (4)
19var builder = ImmutableArray.CreateBuilder<Token>(); 100var builder = ImmutableArray.CreateBuilder<string>(); 175var builder = ImmutableArray.CreateBuilder<TypeSignature>(); 263var builder = ImmutableArray.CreateBuilder<ParameterSignature>();
MetadataDecoder.cs (2)
39var builder = ImmutableArray.CreateBuilder<ParameterSignature>(parameterCount); 176var builder = ImmutableArray.CreateBuilder<TypeSignature>(typeArgCount);
MetadataResolver.cs (2)
304var builder = ImmutableArray.CreateBuilder<string>(); 309private void GetAllGenericTypeParameters(Name typeName, ImmutableArray<string>.Builder builder)
VisualBasic\MemberSignatureParser.cs (4)
23var builder = ImmutableArray.CreateBuilder<Token>(); 119var builder = ImmutableArray.CreateBuilder<string>(); 201var builder = ImmutableArray.CreateBuilder<TypeSignature>(); 303var builder = ImmutableArray.CreateBuilder<ParameterSignature>();
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
FunctionResolverTestBase.cs (1)
202var builder = ImmutableArray.CreateBuilder<string>(arity);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (1)
59var dummyDescriptors = ImmutableArray.CreateBuilder<DiagnosticDescriptor>();
Microsoft.CodeAnalysis.Features (28)
ChangeSignature\AbstractChangeSignatureService.cs (2)
693var newParameters = ImmutableArray.CreateBuilder<T>(); 973var updatedLeadingTrivia = ImmutableArray.CreateBuilder<SyntaxTrivia>();
Common\GlyphExtensions.cs (1)
16var builder = ImmutableArray.CreateBuilder<Glyph>(initialCapacity: tags.Length);
Completion\CommonCompletionItem.cs (1)
87var builder = ImmutableArray<TaggedText>.Empty.ToBuilder();
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (1)
38internal readonly ImmutableArray<TaggedText>.Builder Builder = ImmutableArray.CreateBuilder<TaggedText>();
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (9)
645var newActiveStatements = ImmutableArray.CreateBuilder<ActiveStatement>(oldActiveStatements.Length); 648var newExceptionRegions = ImmutableArray.CreateBuilder<ImmutableArray<SourceFileSpan>>(oldActiveStatements.Length); 787[In, Out] ImmutableArray<ActiveStatement>.Builder newActiveStatements, 788[In, Out] ImmutableArray<ImmutableArray<SourceFileSpan>>.Builder newExceptionRegions, 944[Out] ImmutableArray<ActiveStatement>.Builder newActiveStatements, 945[Out] ImmutableArray<ImmutableArray<SourceFileSpan>>.Builder newExceptionRegions, 1360ImmutableArray<ImmutableArray<SourceFileSpan>>.Builder newExceptionRegions, 2507ImmutableArray<ActiveStatement>.Builder newActiveStatements, 2508ImmutableArray<ImmutableArray<SourceFileSpan>>.Builder newExceptionRegions,
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (1)
38var builder = ImmutableArray.CreateBuilder<DiagnosticDescriptor>();
QuickInfo\QuickInfoUtilities.cs (7)
47var builder = ImmutableArray.CreateBuilder<TaggedText>(); 59var builder = ImmutableArray.CreateBuilder<TaggedText>(); 85var builder = ImmutableArray.CreateBuilder<TaggedText>(); 96var builder = ImmutableArray.CreateBuilder<TaggedText>(); 105var builder = ImmutableArray.CreateBuilder<TaggedText>(); 113var builder = ImmutableArray.CreateBuilder<TaggedText>(); 121var builder = ImmutableArray.CreateBuilder<TaggedText>();
src\Analyzers\Core\Analyzers\DiagnosticCustomTags.cs (1)
83var customTagsBuilder = ImmutableArray.CreateBuilder<string>();
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
53var diagnostics = ImmutableArray.CreateBuilder<Diagnostic>();
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
102var compilationAssemblies = ImmutableArray.CreateBuilder<string>();
UnusedReferences\UnusedReferencesRemover.cs (3)
68var unusedReferencesBuilder = ImmutableArray.CreateBuilder<ReferenceInfo>(); 138var unusedReferencesBuilder = ImmutableArray.CreateBuilder<ReferenceInfo>(); 197var unusedReferencesBuilder = ImmutableArray.CreateBuilder<ReferenceInfo>();
Microsoft.CodeAnalysis.InteractiveHost (2)
Interactive\Core\InteractiveHost.Service.cs (1)
506var metadataReferencePaths = ImmutableArray.CreateBuilder<string>();
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
54private readonly ImmutableArray<T>.Builder _builder;
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (2)
35var watchedDirectoriesBuilder = ImmutableArray.CreateBuilder<WatchedDirectory>(watchedDirectories.Length); 36var watcherBuilder = ImmutableArray.CreateBuilder<FileSystemWatcher>(watchedDirectories.Length);
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (1)
168var builder = ImmutableArray.CreateBuilder<StateSet>();
Features\FindUsages\SimpleFindUsagesContext.cs (2)
22private readonly ImmutableArray<DefinitionItem>.Builder _definitionItems = 25private readonly ImmutableArray<SourceReferenceItem>.Builder _referenceItems =
RoslynLanguageServer.cs (3)
110ImmutableArray<BaseService>.Builder builder => builder.ToImmutable(), 144var builder = ImmutableArray.CreateBuilder<BaseService>(); 152case ImmutableArray<BaseService>.Builder existingBuilder:
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\MethodHandlerDetails.cs (2)
34var builder = ImmutableArray.CreateBuilder<MethodHandlerDetails>(initialCapacity: allHandlerDetails.Length); 59var builder = ImmutableArray.CreateBuilder<(Type? RequestType, Type? ResponseType, Type RequestContextType)>();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Completion\CompletionFeaturesTests.cs (2)
600var builder = ImmutableArray.CreateBuilder<CodeAnalysis.Completion.CompletionItem>(); 930var builder = ImmutableArray.CreateBuilder<CodeAnalysis.Completion.CompletionItem>();
SemanticTokens\AbstractSemanticTokensTests.cs (1)
119var convertedStringsBuilder = ImmutableArray.CreateBuilder<string>(data.Length / 5);
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ArrayBuilder.cs (1)
54private readonly ImmutableArray<T>.Builder _builder;
Microsoft.CodeAnalysis.Rebuild (3)
CompilationOptionsReader.cs (3)
298var builder = ImmutableArray.CreateBuilder<SyntaxTree>(sourceFileCount); 324var builder = ImmutableArray.CreateBuilder<MetadataReference>(); 355var builder = ImmutableArray.CreateBuilder<MetadataReference>();
Microsoft.CodeAnalysis.Remote.ServiceHub (4)
Host\RemoteWorkspace.SolutionCreator.cs (2)
485ImmutableArray<DocumentInfo>.Builder? lazyDocumentsToAdd = null; 505ImmutableArray<DocumentId>.Builder? lazyDocumentsToRemove = null;
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (2)
490var projectBuilder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 491var hostBuilder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>();
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (1)
452ImmutableArray<ModuleMetadata>.Builder moduleBuilder = null;
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2186var builder = ImmutableArray.CreateBuilder<SuppressionDescriptor>();
Microsoft.CodeAnalysis.UnitTests (7)
Analyzers\AnalyzerFileReferenceTests.cs (7)
150var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 169var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 186var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 246var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 264var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 286var builder = ImmutableArray.CreateBuilder<DiagnosticAnalyzer>(); 497var builder = ImmutableArray.CreateBuilder<ISourceGenerator>();
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (2)
46Private _diagnostics As ImmutableArray(Of Diagnostic).Builder 62Public ReadOnly Property DiagnosticsBuilder As ImmutableArray(Of Diagnostic).Builder
Microsoft.CodeAnalysis.Workspaces (23)
Diagnostics\HostDiagnosticAnalyzers.cs (1)
166var descriptors = ImmutableArray.CreateBuilder<DiagnosticDescriptor>();
Shared\Utilities\DocumentationComment.cs (4)
119private ImmutableArray<string>.Builder? _parameterNamesBuilder; 120private ImmutableArray<string>.Builder? _typeParameterNamesBuilder; 121private ImmutableArray<string>.Builder? _exceptionTypesBuilder; 122private Dictionary<string, ImmutableArray<string>.Builder>? _exceptionTextBuilders;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
54private readonly ImmutableArray<T>.Builder _builder;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (3)
118this ImmutableArray<IOption2>.Builder optionsBuilder, 131this ImmutableArray<IOption2>.Builder optionsBuilder, 143this ImmutableArray<IOption2>.Builder optionsBuilder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
20private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
16private static readonly ImmutableArray<IOption2>.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
43public static ImmutableArray<T> ToImmutableAndClear<T>(this ImmutableArray<T>.Builder builder)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (4)
128var nodes = ImmutableArray.CreateBuilder<Node>(_builderNodes.Length); 132var edges = ImmutableArray.CreateBuilder<Edge>(Math.Max(0, _builderNodes.Length - 1)); 139private void BuildArrays(ImmutableArray<Node>.Builder nodes, ImmutableArray<Edge>.Builder edges)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
226var builder = ImmutableArray.CreateBuilder<byte>(count);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (3)
54private readonly ImmutableArray<DocumentInfo>.Builder _documentsAddedInBatch = ImmutableArray.CreateBuilder<DocumentInfo>(); 540ImmutableArray<string>.Builder documentFileNamesAdded, 555ImmutableArray<string>.Builder documentFileNamesAdded,
Workspace\ProjectSystem\ProjectSystemProject.cs (2)
582var documentFileNamesAddedBuilder = ImmutableArray.CreateBuilder<string>(); 1422private static void ClearAndZeroCapacity<T>(ImmutableArray<T>.Builder list)
Workspace\Solution\ProjectDependencyGraph_AddProject.cs (1)
30var builder = newDependencySets.ToBuilder();
Microsoft.CodeAnalysis.Workspaces.MSBuild (6)
MSBuild\MSBuildProjectLoader.cs (1)
195var projectPaths = ImmutableArray.CreateBuilder<string>();
MSBuild\MSBuildProjectLoader.Worker.cs (3)
131var results = ImmutableArray.CreateBuilder<ProjectInfo>(); 203var results = ImmutableArray.CreateBuilder<ProjectFileInfo>(projectFileInfos.Length); 228var builder = ImmutableArray.CreateBuilder<ProjectInfo>();
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (2)
147var builder = ImmutableArray.CreateBuilder<UnresolvedMetadataReference>(); 162var builder = ImmutableArray.CreateBuilder<MetadataReference>();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
BuildHost.cs (1)
148var builder = ImmutableArray.CreateBuilder<(string ProjectPath, string ProjectGuid)>();
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
17private readonly ImmutableArray<string>.Builder _builder;
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
54private readonly ImmutableArray<T>.Builder _builder;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
43public static ImmutableArray<T> ToImmutableAndClear<T>(this ImmutableArray<T>.Builder builder)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
226var builder = ImmutableArray.CreateBuilder<byte>(count);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Formatting\FormattingTestBase.cs (1)
107var outputBuilder = ImmutableArray.CreateBuilder<TextSpan>(inputSpans.Length);
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
MethodHandlerDetails.cs (2)
34var builder = ImmutableArray.CreateBuilder<MethodHandlerDetails>(initialCapacity: allHandlerDetails.Length); 59var builder = ImmutableArray.CreateBuilder<(Type? RequestType, Type? ResponseType, Type RequestContextType)>();
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Gen.Logging (1)
src\Generators\Shared\RoslynExtensions.cs (1)
122var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Gen.Metrics (1)
src\Generators\Shared\RoslynExtensions.cs (1)
122var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Interop.ComInterfaceGenerator (13)
ComClassInfo.cs (1)
42ImmutableArray<string>.Builder names = ImmutableArray.CreateBuilder<string>();
ComInterfaceContext.cs (1)
33var accumulator = ImmutableArray.CreateBuilder<DiagnosticOr<ComInterfaceContext>>(data.Length);
ComInterfaceGenerator.cs (2)
433var contextList = ImmutableArray.CreateBuilder<ComInterfaceAndMethodsContext>(); 437var methodList = ImmutableArray.CreateBuilder<ComMethodContext>();
ComInterfaceInfo.cs (2)
112ImmutableArray<DiagnosticInfo>.Builder nonFatalDiagnostics = ImmutableArray.CreateBuilder<DiagnosticInfo>(); 150ImmutableArray<InterfaceInfo>.Builder builder = ImmutableArray.CreateBuilder<InterfaceInfo>();
ComMethodInfo.cs (2)
42var methods = ImmutableArray.CreateBuilder<DiagnosticOr<(ComMethodInfo, IMethodSymbol)>>(); 145var attributeInfos = ImmutableArray.CreateBuilder<AttributeInfo>(attributes.Length);
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
58ImmutableArray<Project>.Builder projectsWithDiagnostics = ImmutableArray.CreateBuilder<Project>();
VirtualMethodPointerStubGenerator.cs (3)
181var elements = ImmutableArray.CreateBuilder<TypePositionInfo>(originalElements.Length + 2); 203var elements = ImmutableArray.CreateBuilder<TypePositionInfo>(originalElements.Length + 2); 288ImmutableArray<FunctionPointerUnmanagedCallingConventionSyntax>.Builder callingConventions = ImmutableArray.CreateBuilder<FunctionPointerUnmanagedCallingConventionSyntax>();
Microsoft.Interop.LibraryImportGenerator (2)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
58ImmutableArray<Project>.Builder projectsWithDiagnostics = ImmutableArray.CreateBuilder<Project>();
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
Microsoft.Interop.SourceGeneration (19)
BoundGenerators.cs (4)
26ImmutableArray<IBoundMarshallingGenerator>.Builder signatureMarshallers = ImmutableArray.CreateBuilder<IBoundMarshallingGenerator>(); 27ImmutableArray<IBoundMarshallingGenerator>.Builder nativeParamMarshallers = ImmutableArray.CreateBuilder<IBoundMarshallingGenerator>(); 28ImmutableArray<IBoundMarshallingGenerator>.Builder managedParamMarshallers = ImmutableArray.CreateBuilder<IBoundMarshallingGenerator>(); 29ImmutableArray<GeneratorDiagnostic>.Builder generatorDiagnostics = ImmutableArray.CreateBuilder<GeneratorDiagnostic>();
ContainingSyntaxContext.cs (1)
52ImmutableArray<ContainingSyntax>.Builder containingTypeInfoBuilder = ImmutableArray.CreateBuilder<ContainingSyntax>();
GeneratedStatements.cs (2)
74ImmutableArray<StatementSyntax>.Builder statementsToUpdate = ImmutableArray.CreateBuilder<StatementSyntax>(); 158ImmutableArray<StatementSyntax>.Builder catchClauseBuilder = ImmutableArray.CreateBuilder<StatementSyntax>();
IncrementalValuesProviderExtensions.cs (1)
23ImmutableArray<(T, U)>.Builder builder = ImmutableArray.CreateBuilder<(T, U)>(data.Left.Length);
SignatureContext.cs (2)
64ImmutableArray<AttributeListSyntax>.Builder additionalAttrs = ImmutableArray.CreateBuilder<AttributeListSyntax>(); 108ImmutableArray<TypePositionInfo>.Builder typeInfos = ImmutableArray.CreateBuilder<TypePositionInfo>();
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
TypeSymbolExtensions.cs (2)
316ImmutableArray<ITypeSymbol>.Builder typeArguments = ImmutableArray.CreateBuilder<ITypeSymbol>(); 317ImmutableArray<NullableAnnotation>.Builder nullableAnnotations = ImmutableArray.CreateBuilder<NullableAnnotation>();
VariableDeclarations.cs (6)
18ImmutableArray<StatementSyntax>.Builder initializations = ImmutableArray.CreateBuilder<StatementSyntax>(); 19ImmutableArray<LocalDeclarationStatementSyntax>.Builder variables = ImmutableArray.CreateBuilder<LocalDeclarationStatementSyntax>(); 55static void AppendVariableDeclarations(ImmutableArray<LocalDeclarationStatementSyntax>.Builder statementsToUpdate, IBoundMarshallingGenerator marshaller, StubIdentifierContext context, bool initializeToDefault) 81ImmutableArray<StatementSyntax>.Builder initializations = ImmutableArray.CreateBuilder<StatementSyntax>(); 82ImmutableArray<LocalDeclarationStatementSyntax>.Builder variables = ImmutableArray.CreateBuilder<LocalDeclarationStatementSyntax>(); 112static void AppendVariableDeclarations(ImmutableArray<LocalDeclarationStatementSyntax>.Builder statementsToUpdate, IBoundMarshallingGenerator marshaller, StubIdentifierContext context, bool initializeToDefault)
Microsoft.ML.Transforms (2)
Text\LdaTransform.cs (2)
340var itemScoresPerTopicBuilder = ImmutableArray.CreateBuilder<List<ModelParameters.ItemScore>>(); 357var wordScoresPerTopicBuilder = ImmutableArray.CreateBuilder<List<ModelParameters.WordItemScore>>();
Microsoft.VisualStudio.LanguageServices (32)
Interactive\VsResetInteractive.cs (4)
114var referencesBuilder = ImmutableArray.CreateBuilder<string>(); 115var referenceSearchPathsBuilder = ImmutableArray.CreateBuilder<string>(); 116var sourceSearchPathsBuilder = ImmutableArray.CreateBuilder<string>(); 117var namespacesToImportBuilder = ImmutableArray.CreateBuilder<string>();
Library\ObjectBrowser\AbstractListItemFactory.cs (16)
174var builder = ImmutableArray.CreateBuilder<ObjectListItem>(symbols.Length); 186ImmutableArray<ObjectListItem>.Builder builder) 213var symbolBuilder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(); 255var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 296var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 319var symbolBuilder = ImmutableArray.CreateBuilder<ISymbol>(members.Length); 334var symbolBuilder = ImmutableArray.CreateBuilder<ISymbol>(); 405public void CollectNamespaceListItems(IAssemblySymbol assemblySymbol, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString) 449var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 551var builder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(typeMembers.Length); 592var projectListItemBuilder = ImmutableArray.CreateBuilder<ObjectListItem>(); 593var referenceListItemBuilder = ImmutableArray.CreateBuilder<ObjectListItem>(); 666var builder = ImmutableArray.CreateBuilder<INamedTypeSymbol>(typeMembers.Length); 705var finalBuilder = ImmutableArray.CreateBuilder<ObjectListItem>(); 743public void CollectTypeListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString) 775public void CollectMemberListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_ListItems.cs (3)
17internal void CollectMemberListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString) 20internal void CollectNamespaceListItems(IAssemblySymbol assemblySymbol, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString) 23internal void CollectTypeListItems(IAssemblySymbol assemblySymbol, Compilation compilation, ProjectId projectId, ImmutableArray<ObjectListItem>.Builder builder, string searchString)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Search.cs (3)
54var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 69var builder = ImmutableArray.CreateBuilder<ObjectListItem>(); 88var builder = ImmutableArray.CreateBuilder<ObjectListItem>();
Library\VsNavInfo\Extensions.cs (2)
14public static void Add(this ImmutableArray<NavInfoNode>.Builder builder, string name, _LIB_LISTTYPE type, bool expandDottedNames) 46public static void Add(this ImmutableArray<NavInfoNode>.Builder builder, string name, _LIB_LISTTYPE type)
Library\VsNavInfo\NavInfo.cs (2)
68var builder = ImmutableArray.CreateBuilder<NavInfoNode>(); 90var builder = ImmutableArray.CreateBuilder<NavInfoNode>();
PullMemberUp\WarningDialog\PullMemberUpWarningViewModel.cs (1)
25var warningMessagesBuilder = ImmutableArray.CreateBuilder<string>();
Snippets\AbstractSnippetInfoService.cs (1)
180var snippetListBuilder = ImmutableArray.CreateBuilder<SnippetInfo>();
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\Projects\RoslynRemoteProjectInfoProvider.cs (1)
68var projectInfos = ImmutableArray.CreateBuilder<ProjectInfo>();
Mvc.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
22var references = ImmutableArray.CreateBuilder<MetadataReference>();
RunTests (1)
TestRunner.cs (1)
405var processResults = ImmutableArray.CreateBuilder<ProcessResult>();
System.Collections.Immutable (15)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (6)
31/// Initializes a new instance of the <see cref="Builder"/> class. 42/// Initializes a new instance of the <see cref="Builder"/> class. 201/// <exception cref="InvalidOperationException">When <see cref="ImmutableArray{T}.Builder.Count"/> doesn't 202/// equal <see cref="ImmutableArray{T}.Builder.Capacity"/>.</exception> 475public void AddRange(Builder items) 486public void AddRange<TDerived>(ImmutableArray<TDerived>.Builder items) where TDerived : T
System\Collections\Immutable\ImmutableArray_1.Builder.DebuggerProxy.cs (2)
16private readonly ImmutableArray<T>.Builder _builder; 21public ImmutableArrayBuilderDebuggerProxy(ImmutableArray<T>.Builder builder)
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (2)
263public ImmutableArray<T>.Builder ToBuilder() 271var builder = new Builder(self.Length);
System\Linq\ImmutableArrayExtensions.cs (5)
637public static T First<T>(this ImmutableArray<T>.Builder builder) 652public static T? FirstOrDefault<T>(this ImmutableArray<T>.Builder builder) 663public static T Last<T>(this ImmutableArray<T>.Builder builder) 678public static T? LastOrDefault<T>(this ImmutableArray<T>.Builder builder) 688public static bool Any<T>(this ImmutableArray<T>.Builder builder)
System.Reflection.Metadata (22)
System\Reflection\Metadata\Ecma335\CustomAttributeDecoder.cs (3)
109var arguments = ImmutableArray.CreateBuilder<CustomAttributeTypedArgument<TType>>(count); 128var arguments = ImmutableArray.CreateBuilder<CustomAttributeNamedArgument<TType>>(count); 404var array = ImmutableArray.CreateBuilder<CustomAttributeTypedArgument<TType>>(count);
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
545var stringVirtualIndexToHeapOffsetMap = ImmutableArray.CreateBuilder<int>(totalCount);
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (1)
296var rowCounts = ImmutableArray.CreateBuilder<int>(MetadataTokens.TableCount);
System\Reflection\Metadata\Ecma335\SignatureDecoder.cs (4)
148var types = ImmutableArray.CreateBuilder<TType>(count); 187var parameterBuilder = ImmutableArray.CreateBuilder<TType>(parameterCount); 260var builder = ImmutableArray.CreateBuilder<int>(sizesCount); 271var builder = ImmutableArray.CreateBuilder<int>(lowerBoundsCount);
System\Reflection\Metadata\Internal\NamespaceCache.cs (3)
416public ImmutableArray<NamespaceDefinitionHandle>.Builder? Namespaces; 417public ImmutableArray<TypeDefinitionHandle>.Builder? TypeDefinitions; 418public ImmutableArray<ExportedTypeHandle>.Builder? ExportedTypes;
System\Reflection\Metadata\MetadataReader.cs (2)
1419var groupedNestedTypes = new Dictionary<TypeDefinitionHandle, ImmutableArray<TypeDefinitionHandle>.Builder>(); 1422ImmutableArray<TypeDefinitionHandle>.Builder? builder = null;
System\Reflection\Metadata\TypeName.cs (1)
51ImmutableArray<TypeName>.Builder? genericTypeArguments = default,
System\Reflection\Metadata\TypeNameParser.cs (1)
92ImmutableArray<TypeName>.Builder? genericArgs = null;
System\Reflection\Metadata\TypeSystem\EventDefinition.cs (1)
65ImmutableArray<MethodDefinitionHandle>.Builder? other = null;
System\Reflection\Metadata\TypeSystem\PropertyDefinition.cs (1)
76ImmutableArray<MethodDefinitionHandle>.Builder? other = null;
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (1)
96var builder = ImmutableArray.CreateBuilder<Section>(3);
System\Reflection\PortableExecutable\PEBuilder.cs (1)
126var result = ImmutableArray.CreateBuilder<SerializedSection>(sections.Length);
System\Reflection\PortableExecutable\PEHeaders.cs (1)
301var builder = ImmutableArray.CreateBuilder<SectionHeader>(numberOfSections);
System\Reflection\PortableExecutable\PEReader.cs (1)
567var builder = ImmutableArray.CreateBuilder<DebugDirectoryEntry>(entryCount);
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
170var builder = ImmutableArray.CreateBuilder<T>(span.Length);
System.Text.RegularExpressions.Generator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
170var builder = ImmutableArray.CreateBuilder<T>(span.Length);