2 instantiations of ArrayBuilder
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\InternalUtilities\SetWithInsertionOrder.cs (1)
28_elements = new ArrayBuilder<T>();
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
495pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool!), size);
672 references to ArrayBuilder
Microsoft.CodeAnalysis.Workspaces (672)
Classification\AbstractClassificationService.cs (1)
221protected static void AddRange(ArrayBuilder<ClassifiedSpan> temp, List<ClassifiedSpan> result)
Classification\Classifier.cs (2)
126var parts = ArrayBuilder<SymbolDisplayPart>.GetInstance();
Classification\IRemoteSemanticClassificationService.cs (2)
75using var _2 = ArrayBuilder<string>.GetInstance(out var classificationTypes);
CodeActions\CodeAction_Cleanup.cs (2)
89using var _ = ArrayBuilder<(DocumentId documentId, CodeCleanupOptions options)>.GetInstance(documentIds.Length, out var documentIdsAndOptions);
CodeCleanup\AbstractCodeCleanerService.cs (2)
120var builder = ArrayBuilder<TextSpan>.GetInstance();
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (13)
145using var _1 = ArrayBuilder<Task<ImmutableArray<Document>>>.GetInstance(out var tasks); 154using var _2 = ArrayBuilder<CodeAction>.GetInstance(out var codeActions); 163using var _3 = ArrayBuilder<Document>.GetInstance(out var changedDocuments); 185using var _4 = ArrayBuilder<Document>.GetInstance(out var result); 207using var _ = ArrayBuilder<Task>.GetInstance(out var tasks); 231string? codeActionEquivalenceKey, ArrayBuilder<CodeAction> codeActions) 235using var _ = ArrayBuilder<CodeAction>.GetInstance(out var builder);
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (3)
86using var _2 = ArrayBuilder<Diagnostic>.GetInstance(out var builder); 112var builder = PooledDictionary<Document, ArrayBuilder<Diagnostic>>.GetInstance();
CodeFixes\FixAllOccurrences\FixAllState.FixMultipleDiagnosticProvider.cs (2)
38var allDiagnosticsBuilder = ArrayBuilder<Diagnostic>.GetInstance();
Diagnostics\DiagnosticAnalysisResult.cs (5)
127var diagnosticsWithDocumentId = PooledDictionary<DocumentId, ArrayBuilder<DiagnosticData>>.GetInstance(); 128var diagnosticsWithoutDocumentId = ArrayBuilder<DiagnosticData>.GetInstance(); 224using var _ = ArrayBuilder<DiagnosticData>.GetInstance(out var builder);
Diagnostics\DiagnosticData.cs (2)
261using var _ = ArrayBuilder<DiagnosticDataLocation>.GetInstance(diagnostic.AdditionalLocations.Count, out var builder);
Diagnostics\Extensions.cs (6)
26var result = ArrayBuilder<Diagnostic>.GetInstance(); 392using var _ = ArrayBuilder<Diagnostic>.GetInstance(out var diagnosticsBuilder); 416using var _ = ArrayBuilder<Diagnostic>.GetInstance(out var diagnosticsBuilder);
Diagnostics\HostDiagnosticAnalyzers.cs (2)
248using var _ = ArrayBuilder<KeyValuePair<object, AnalyzerReference>>.GetInstance(source.Count, out var builder);
Diagnostics\SkippedHostAnalyzersInfo.cs (2)
133var skippedDiagnosticIdsBuilder = ArrayBuilder<string>.GetInstance();
FindSymbols\Declarations\DeclarationFinder.cs (2)
22ArrayBuilder<ISymbol> list, 73ArrayBuilder<ISymbol> list,
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (11)
62using var _ = ArrayBuilder<ISymbol>.GetInstance(out var result); 82using var _ = ArrayBuilder<ISymbol>.GetInstance(out var buffer); 97using var _ = ArrayBuilder<ISymbol>.GetInstance(out var buffer); 117using var _ = ArrayBuilder<ISymbol>.GetInstance(out var buffer); 136async Task AddAllAsync(ArrayBuilder<ISymbol> buffer, bool mapSymbol) 161var result = ArrayBuilder<ISymbol>.GetInstance(array.Count);
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (4)
180using var _ = ArrayBuilder<ISymbol>.GetInstance(out var result); 193using var _ = ArrayBuilder<ISymbol>.GetInstance(out var result);
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (5)
143using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var matches); 152ArrayBuilder<SyntaxToken> matches, CancellationToken cancellationToken) 170ArrayBuilder<SyntaxToken> matches) 189private void CheckToken(SyntaxToken token, ArrayBuilder<SyntaxToken> matches)
FindSymbols\FindReferences\BaseTypeFinder.cs (4)
20using var _ = ArrayBuilder<ISymbol>.GetInstance(out var results); 82var typesBuilder = ArrayBuilder<INamedTypeSymbol>.GetInstance();
FindSymbols\FindReferences\DependentProjectsFinder.cs (4)
226using var _2 = ArrayBuilder<ProjectId>.GetInstance(out var projectIdsToProcess); 330using var _ = ArrayBuilder<(PortableExecutableReference reference, MetadataId metadataId)>.GetInstance(out var uncomputedReferences);
FindSymbols\FindReferences\DependentTypeFinder_Remote.cs (2)
84using var _ = ArrayBuilder<INamedTypeSymbol>.GetInstance(out var builder);
FindSymbols\FindReferences\Finders\AbstractMemberScopedReferenceFinder.cs (2)
109using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
FindSymbols\FindReferences\Finders\AbstractMethodOrPropertyOrEventSymbolReferenceFinder.cs (2)
36using var _ = ArrayBuilder<IMethodSymbol>.GetInstance(out var result);
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (3)
243ArrayBuilder<FinderLocation> initialReferences, 256ArrayBuilder<FinderLocation> initialReferences, 269ArrayBuilder<FinderLocation> initialReferences,
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (5)
33using var _ = ArrayBuilder<ISymbol>.GetInstance(out var result); 47private static void Add<TSymbol>(ArrayBuilder<ISymbol> result, ImmutableArray<TSymbol> enumerable) where TSymbol : ISymbol 115using var _ = ArrayBuilder<FinderLocation>.GetInstance(out var initialReferences);
FindSymbols\FindReferences\Finders\NamespaceSymbolReferenceFinder.cs (3)
68using var _ = ArrayBuilder<FinderLocation>.GetInstance(out var initialReferences); 93INamespaceSymbol symbol, FindReferencesDocumentState state, ArrayBuilder<FinderLocation> initialReferences, string namespaceName, string alias, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (10)
62using var _ = ArrayBuilder<ISymbol>.GetInstance(out var symbols); 74private static void CascadeBetweenAnonymousDelegateParameters(IParameterSymbol parameter, ArrayBuilder<ISymbol> symbols) 84IParameterSymbol parameter, ArrayBuilder<ISymbol> symbols, CancellationToken cancellationToken) 92ArrayBuilder<ISymbol> results, 134ArrayBuilder<ISymbol> results, 184ArrayBuilder<ISymbol> results) 205ArrayBuilder<ISymbol> results) 232ArrayBuilder<ISymbol> results, 242ArrayBuilder<ISymbol> results)
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (6)
36using var _ = ArrayBuilder<ISymbol>.GetInstance(out var result); 46private static void CascadeToOtherPartOfPartial(IPropertySymbol symbol, ArrayBuilder<ISymbol> result) 52private static void CascadeToBackingFields(IPropertySymbol symbol, ArrayBuilder<ISymbol> result) 64private static void CascadeToAccessors(IPropertySymbol symbol, ArrayBuilder<ISymbol> result) 70private static void CascadeToPrimaryConstructorParameters(IPropertySymbol property, ArrayBuilder<ISymbol> result, CancellationToken cancellationToken)
FindSymbols\FindReferences\FindReferenceCache.cs (6)
155using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var result); 193using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var result); 225using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var initializers);
FindSymbols\FindReferences\FindReferencesSearchEngine.BidirectionalSymbolSet.cs (2)
50using var _ = ArrayBuilder<ISymbol>.GetInstance(out var workQueue);
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (8)
151using var _ = ArrayBuilder<ISymbol>.GetInstance(out var workQueue); 171using var _ = ArrayBuilder<ISymbol>.GetInstance(out var workQueue); 186FindReferencesSearchEngine engine, ImmutableArray<ISymbol> symbols, MetadataUnifyingSymbolHashSet seenSymbols, ArrayBuilder<ISymbol> workQueue, CancellationToken cancellationToken) 193FindReferencesSearchEngine engine, ISymbol symbol, MetadataUnifyingSymbolHashSet seenSymbols, ArrayBuilder<ISymbol> workQueue, CancellationToken cancellationToken) 239MetadataUnifyingSymbolHashSet seenSymbols, ArrayBuilder<ISymbol> workQueue, 274ArrayBuilder<ISymbol> workQueue,
FindSymbols\FindReferences\FindReferencesSearchEngine.UnidirectionalSymbolSet.cs (2)
48using var _ = ArrayBuilder<ISymbol>.GetInstance(out var workQueue);
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (2)
167using var _ = ArrayBuilder<(SymbolGroup group, ISymbol symbol, ReferenceLocation location)>.GetInstance(out var result);
FindSymbols\FindReferences\StandardCallbacks.cs (1)
16public static readonly Action<T, ArrayBuilder<T>> AddToArrayBuilder =
FindSymbols\SymbolFinder.FindReferencesServerCallback.cs (2)
72using var _ = ArrayBuilder<(SymbolGroup group, ISymbol symbol, ReferenceLocation location)>.GetInstance(references.Length, out var rehydrated);
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (2)
58using var _ = ArrayBuilder<ISymbol>.GetInstance(out var result);
FindSymbols\SymbolFinder_Hierarchy.cs (6)
44using var _ = ArrayBuilder<ISymbol>.GetInstance(out var results); 149using var _ = ArrayBuilder<ISymbol>.GetInstance(out var builder); 370using var _ = ArrayBuilder<ISymbol>.GetInstance(out var results);
FindSymbols\SymbolTree\SymbolTreeInfo.cs (6)
305using var _1 = ArrayBuilder<int>.GetInstance(unsortedNodes.Length, out var tmp); 316using var _2 = ArrayBuilder<int>.GetInstance(unsortedNodes.Length, out var ranking); 321using var _3 = ArrayBuilder<Node>.GetInstance(unsortedNodes.Length, out var result);
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (3)
729var unsortedNodes = ArrayBuilder<BuilderNode>.GetInstance(); 736private readonly void AddUnsortedNodes(ArrayBuilder<BuilderNode> unsortedNodes,
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (2)
200using var _ = ArrayBuilder<Node>.GetInstance(nodeCount, out var nodes);
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (5)
104using var _ = ArrayBuilder<Checksum>.GetInstance(out var allChecksums); 130using var _ = ArrayBuilder<BuilderNode>.GetInstance(out var unsortedBuilderNodes); 152ArrayBuilder<BuilderNode> list)
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (2)
145using var _ = ArrayBuilder<Task>.GetInstance(out var tasks);
FindSymbols\TopLevelSyntaxTree\IDeclaredSymbolInfoFactoryService.cs (2)
16void AddDeclaredSymbolInfos(ProjectState project, SyntaxNode root, ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, Dictionary<string, ArrayBuilder<int>> extensionMethodInfo, CancellationToken cancellationToken);
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex_Create.cs (3)
20using var _1 = ArrayBuilder<DeclaredSymbolInfo>.GetInstance(out var declaredSymbolInfos); 21using var _2 = PooledDictionary<string, ArrayBuilder<int>>.GetInstance(out var extensionMethodInfo);
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (10)
72SyntaxNode container, TMemberDeclarationSyntax memberDeclaration, StringTable stringTable, ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, string containerDisplayName, string fullyQualifiedContainerName); 74TMemberDeclarationSyntax memberDeclaration, StringTable stringTable, ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, string containerDisplayName, string fullyQualifiedContainerName, CancellationToken cancellationToken); 76SyntaxNode container, TMemberDeclarationSyntax memberDeclaration, StringTable stringTable, ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, string containerDisplayName, string fullyQualifiedContainerName, CancellationToken cancellationToken); 144protected static void Intern(StringTable stringTable, ArrayBuilder<string> builder) 155ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, 156Dictionary<string, ArrayBuilder<int>> extensionMethodInfo, 179ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, 181Dictionary<string, ArrayBuilder<int>> extensionMethodInfo, 351if (!extensionMethodInfo.TryGetValue(receiverTypeName, out var arrayBuilder)) 353arrayBuilder = ArrayBuilder<int>.GetInstance();
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (1)
49var builder = PooledDictionary<Document, ArrayBuilder<TextSpan>>.GetInstance();
LinkedFileDiffMerging\AbstractLinkedFileMergeConflictCommentAdditionService.cs (3)
21public ImmutableArray<TextChange> CreateEdits(SourceText originalSourceText, ArrayBuilder<UnmergedDocumentChanges> unmergedChanges) 23using var _ = ArrayBuilder<TextChange>.GetInstance(out var commentChanges);
LinkedFileDiffMerging\IMergeConflictHandler.cs (1)
13ImmutableArray<TextChange> CreateEdits(SourceText originalSourceText, ArrayBuilder<UnmergedDocumentChanges> unmergedChanges);
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (19)
17using DocumentAndHashBuilder = ArrayBuilder<(Document newDocument, ImmutableArray<byte> newContentHash)>; 23using var _1 = PooledDictionary<string, DocumentAndHashBuilder>.GetInstance(out var filePathToNewDocumentsAndHashes); 37var newDocumentsAndHashes = filePathToNewDocumentsAndHashes.GetOrAdd(filePath, static (_, capacity) => DocumentAndHashBuilder.GetInstance(capacity), relatedDocumentIds.Length); 49using var _ = ArrayBuilder<LinkedFileMergeResult>.GetInstance( 51out var linkedFileMergeResults); 91DocumentAndHashBuilder newDocumentsAndHashes, 108using var _ = ArrayBuilder<UnmergedDocumentChanges>.GetInstance(out var unmergedChanges); 140ArrayBuilder<UnmergedDocumentChanges> unmergedChanges, 144using var _1 = ArrayBuilder<TextChange>.GetInstance(out var unmergedDocumentChanges); 145using var _2 = ArrayBuilder<TextChange>.GetInstance(out var successfullyMergedChanges); 216using var _1 = ArrayBuilder<TextChange>.GetInstance(out var combinedChanges); 217using var _2 = ArrayBuilder<TextSpan>.GetInstance(out var mergeConflictResolutionSpans); 277using var _ = ArrayBuilder<TextChange>.GetInstance(changes.Length, out var normalizedChanges);
LinkedFileDiffMerging\LinkedFileMergeSessionResult.cs (1)
18public LinkedFileMergeSessionResult(Solution mergedSolution, ArrayBuilder<LinkedFileMergeResult> fileMergeResults)
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (6)
25protected virtual void ProcessDimKeyword(ref ArrayBuilder<TextSpan>? result, SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 40ArrayBuilder<TextSpan>? result = null; 61using var _ = ArrayBuilder<SyntaxNode>.GetInstance(out var stack); 92static void ExtractStructureFromTrivia(ArrayBuilder<SyntaxNode> stack, SyntaxTriviaList triviaList) 105result ??= ArrayBuilder<TextSpan>.GetInstance();
Options\GlobalOptionService.cs (2)
191using var _ = ArrayBuilder<(OptionKey2, object?)>.GetInstance(options.Count, out var changedOptions);
PatternMatching\AllLowerCamelCaseMatcher.cs (2)
75var matchedSpansInReverse = includeMatchedSpans ? ArrayBuilder<TextSpan>.GetInstance() : null;
PatternMatching\CamelCaseResult.cs (2)
21public readonly ArrayBuilder<TextSpan> MatchedSpansInReverse; 23public CamelCaseResult(bool fromStart, bool contiguous, int matchCount, ArrayBuilder<TextSpan> matchedSpansInReverse)
ReassignedVariable\AbstractReassignedVariableService.cs (6)
49using var _2 = ArrayBuilder<TextSpan>.GetInstance(out var result); 63using var _ = ArrayBuilder<SyntaxNode>.GetInstance(out var stack); 298using var _ = ArrayBuilder<SyntaxNode>.GetInstance(out var stack);
Recommendations\AbstractRecommendationServiceRunner.cs (8)
147using var _ = ArrayBuilder<ITypeSymbol>.GetInstance(out var concreteTypes); 194using var _ = ArrayBuilder<ITypeSymbol>.GetInstance(out var builder); 296using var _ = ArrayBuilder<ISymbol>.GetInstance(out var builder); 403using var _ = ArrayBuilder<ISymbol>.GetInstance(containerMembers.Length, out var result);
Remote\RemoteUtilities.cs (2)
27using var _ = ArrayBuilder<(DocumentId, ImmutableArray<TextChange>)>.GetInstance(out var builder);
Rename\ConflictEngine\DeclarationConflictHelpers.cs (6)
52var builder = ArrayBuilder<Location>.GetInstance(); 97var resultBuilder = ArrayBuilder<ImmutableArray<ITypeSymbol>>.GetInstance(); 99var signatureBuilder = ArrayBuilder<ITypeSymbol>.GetInstance();
Rename\IRenameRewriterLanguageService.cs (1)
135IEnumerable<ISymbol> properties, string newPropertyName, ArrayBuilder<Location> conflicts)
Rename\Renamer.cs (2)
115using var _ = ArrayBuilder<RenameDocumentAction>.GetInstance(out var actions);
Rename\SymbolicRenameLocations.cs (8)
82using var _0 = ArrayBuilder<RenameLocation>.GetInstance(out var mergedLocations); 83using var _1 = ArrayBuilder<ISymbol>.GetInstance(out var mergedReferencedSymbols); 84using var _2 = ArrayBuilder<ReferenceLocation>.GetInstance(out var mergedImplicitLocations); 117using var _ = ArrayBuilder<SearchResult>.GetInstance(out var overloadsResult);
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (9)
176var results = ArrayBuilder<RenameLocation>.GetInstance(); 332using var _1 = ArrayBuilder<RenameLocation>.GetInstance(out var stringLocations); 333using var _2 = ArrayBuilder<RenameLocation>.GetInstance(out var commentLocations); 364ArrayBuilder<RenameLocation> renameLocations, CancellationToken cancellationToken) 382Document document, string renameText, ArrayBuilder<RenameLocation> renameLocations, CancellationToken cancellationToken) 404ArrayBuilder<RenameLocation> renameLocations)
Serialization\SerializationExtensions.cs (2)
73var builder = ArrayBuilder<string>.GetInstance();
Shared\Extensions\IFindReferencesResultExtensions.cs (2)
128using var _ = ArrayBuilder<ReferencedSymbol>.GetInstance(out var result);
Shared\Extensions\ILanguageMetadataExtensions.cs (6)
32var builder = ImmutableDictionary.CreateBuilder<string, ArrayBuilder<Lazy<TInterface, TMetadata>>>(); 37var list = builder.GetOrAdd(language, _ => ArrayBuilder<Lazy<TInterface, TMetadata>>.GetInstance()); 47using var _ = PooledDictionary<string, ArrayBuilder<Lazy<TInterface, TMetadata>>>.GetInstance(out var map); 55var list = map.GetOrAdd(language, _ => ArrayBuilder<Lazy<TInterface, TMetadata>>.GetInstance());
Shared\Extensions\INamespaceSymbolExtensions.cs (6)
61using var _ = ArrayBuilder<INamespaceOrTypeSymbol>.GetInstance(out var stack); 85using var _ = ArrayBuilder<INamespaceSymbol>.GetInstance(out var stack); 113using var _ = ArrayBuilder<INamespaceSymbol>.GetInstance(out var stack);
Shared\Extensions\ISolutionExtensions.cs (2)
22var results = ArrayBuilder<INamespaceSymbol>.GetInstance();
Shared\Extensions\ITypeSymbolExtensions.cs (2)
42using var _ = ArrayBuilder<ISymbol>.GetInstance(out var builder);
Shared\Extensions\TokenSemanticInfo.cs (2)
36var result = ArrayBuilder<ISymbol>.GetInstance();
Shared\Utilities\AsyncBatchingWorkQueue`2.cs (2)
143using var _ = ArrayBuilder<TItem>.GetInstance(out var items);
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (24)
15public static bool Any<T>(this ArrayBuilder<T> builder, Func<T, bool> predicate) 27public static bool Any<T, A>(this ArrayBuilder<T> builder, Func<T, A, bool> predicate, A arg) 39public static bool All<T>(this ArrayBuilder<T> builder, Func<T, bool> predicate) 51public static bool All<T, A>(this ArrayBuilder<T> builder, Func<T, A, bool> predicate, A arg) 71public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ArrayBuilder<TItem> items, Func<TItem, TResult> map) 91var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 111public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ArrayBuilder<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 131var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 151public static ImmutableArray<TResult> SelectAsArrayWithIndex<TItem, TArg, TResult>(this ArrayBuilder<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg) 171var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 181public static void AddOptional<T>(this ArrayBuilder<T> builder, T? item) 193public static void Push<T>(this ArrayBuilder<T> builder, T e) 198public static T Pop<T>(this ArrayBuilder<T> builder) 205public static bool TryPop<T>(this ArrayBuilder<T> builder, [MaybeNullWhen(false)] out T result) 217public static T Peek<T>(this ArrayBuilder<T> builder) 222public static ImmutableArray<T> ToImmutableOrEmptyAndFree<T>(this ArrayBuilder<T>? builder) 227public static void AddIfNotNull<T>(this ArrayBuilder<T> builder, T? value) 236public static void AddIfNotNull<T>(this ArrayBuilder<T> builder, T? value) 245public static void FreeAll<T>(this ArrayBuilder<T> builder, Func<T, ArrayBuilder<T>?> getNested) 275public static void RemoveWhere<TItem, TArg>(this ArrayBuilder<TItem> builder, Func<TItem, int, TArg, bool> filter, TArg arg)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
79public static void AddPooled<K, V>(this IDictionary<K, ArrayBuilder<V>> dictionary, K key, V value) 82if (!dictionary.TryGetValue(key, out var values)) 84values = ArrayBuilder<V>.GetInstance(); 91public static ImmutableSegmentedDictionary<K, ImmutableArray<V>> ToImmutableSegmentedDictionaryAndFree<K, V>(this IReadOnlyDictionary<K, ArrayBuilder<V>> builder)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (30)
191var builder = ArrayBuilder<TResult>.GetInstance(items.Length); 217var builder = ArrayBuilder<TResult>.GetInstance(); 247var builder = ArrayBuilder<TResult>.GetInstance(); 272var builder = ArrayBuilder<TResult>.GetInstance(); 292var builder = ArrayBuilder<TResult>.GetInstance(); 313var builder = ArrayBuilder<TResult>.GetInstance(); 337var builder = ArrayBuilder<TResult>.GetInstance(); 399var builder = ArrayBuilder<TResult>.GetInstance(); 453var builder = ArrayBuilder<TResult>.GetInstance(self.Length); 482ArrayBuilder<T>? builder = null; 502builder = ArrayBuilder<T>.GetInstance(); 520builder = ArrayBuilder<T>.GetInstance(); 753var builder = ArrayBuilder<T>.GetInstance(); 795var builder = ArrayBuilder<TValue>.GetInstance(); 1081if (existingValueOrArray is ArrayBuilder<T> arrayBuilder) 1088arrayBuilder = ArrayBuilder<T>.GetInstance(capacity: 2); 1116if (value is ArrayBuilder<TNamespaceOrTypeSymbol> builder) 1182var builder = ArrayBuilder<TNamedTypeSymbol>.GetInstance(count);
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (16)
186/// Each value is either a single V or an <see cref="ArrayBuilder{V}"/>. 196internal ValueSet(ArrayBuilder<V> values) 203var arrayBuilder = _value as ArrayBuilder<V>; 213var arrayBuilder = _value as ArrayBuilder<V>; 235var arrayBuilder = _value as ArrayBuilder<V>; 264var arrayBuilder = _value as ArrayBuilder<V>; 276var arrayBuilder = _value as ArrayBuilder<V>; 290internal int Count => (_value as ArrayBuilder<V>)?.Count ?? 1; 311var arrayBuilder = _value as ArrayBuilder<V>; 321arrayBuilder = ArrayBuilder<V>.GetInstance(capacity: 2);
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (5)
80private ArrayBuilder<T>? _builder; 98_builder = ArrayBuilder<T>.GetInstance(capacity) 327/// <see cref="ArrayBuilder{T}"/> instance is taken from the shared pool, and all elements currently in inline 335var builder = ArrayBuilder<T>.GetInstance();
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
857var resolvedParts = ArrayBuilder<string>.GetInstance();
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (20)
361var builder = ArrayBuilder<TResult>.GetInstance(); 372var builder = ArrayBuilder<TResult>.GetInstance(); 405var builder = ArrayBuilder<TResult>.GetInstance(); 417var builder = ArrayBuilder<TResult>.GetInstance(); 430var builder = ArrayBuilder<TResult>.GetInstance(source.Count); 443var builder = ArrayBuilder<TResult>.GetInstance(source.Count); 455var builder = ArrayBuilder<TResult>.GetInstance(); 470var builder = ArrayBuilder<TResult>.GetInstance(); 485var builder = ArrayBuilder<TResult>.GetInstance(); 497var builder = ArrayBuilder<TResult>.GetInstance();
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
98public void AddRangeTo(ArrayBuilder<T> builder)
src\Compilers\Core\Portable\InternalUtilities\SetWithInsertionOrder.cs (1)
21private ArrayBuilder<T>? _elements = null;
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (5)
130var builder = ArrayBuilder<TextChangeRange>.GetInstance(); 370static void addAndAdjustOldDelta(ArrayBuilder<TextChangeRange> builder, ref int oldDelta, TextChangeRange oldChange) 377static void adjustAndAddNewChange(ArrayBuilder<TextChangeRange> builder, int oldDelta, UnadjustedNewChange newChange) 383static void add(ArrayBuilder<TextChangeRange> builder, TextChangeRange change)
src\Dependencies\PooledObjects\ArrayBuilder.cs (27)
17[DebuggerTypeProxy(typeof(ArrayBuilder<>.DebuggerProxy))] 29private readonly ArrayBuilder<T> _builder; 31public DebuggerProxy(ArrayBuilder<T> builder) 56private readonly ObjectPool<ArrayBuilder<T>>? _pool; 67private ArrayBuilder(ObjectPool<ArrayBuilder<T>> pool) 374var tmp = ArrayBuilder<U>.GetInstance(Count); 459private static readonly ObjectPool<ArrayBuilder<T>> s_poolInstance = CreatePool(); 460public static ArrayBuilder<T> GetInstance() 462var builder = s_poolInstance.Allocate(); 467public static ArrayBuilder<T> GetInstance(int capacity) 469var builder = GetInstance(); 474public static ArrayBuilder<T> GetInstance(int capacity, T fillWithValue) 476var builder = GetInstance(); 487public static ObjectPool<ArrayBuilder<T>> CreatePool() 492public static ObjectPool<ArrayBuilder<T>> CreatePool(int size) 494ObjectPool<ArrayBuilder<T>>? pool = null; 495pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool!), size); 534var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 539if (!accumulator.TryGetValue(key, out var bucket)) 541bucket = ArrayBuilder<T>.GetInstance(); 559public void AddRange(ArrayBuilder<T> items) 564public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 572public void AddRange<U>(ArrayBuilder<U> items) where U : T 577public void AddRange<U>(ArrayBuilder<U> items, int start, int length) where U : T 708var result = ArrayBuilder<S>.GetInstance(Count);
src\Dependencies\PooledObjects\ArrayBuilder.Enumerator.cs (2)
14private readonly ArrayBuilder<T> _builder; 17public Enumerator(ArrayBuilder<T> builder)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\NamingStyles\NamingStyleOptionAccumulator.cs (2)
16private ArrayBuilder<NamingStyleOption>? _rules; 33_rules ??= ArrayBuilder<NamingStyleOption>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (4)
55using var _1 = ArrayBuilder<(int minValue, int maxValue)>.GetInstance(out var numberRangePairs); 71ArrayBuilder<(int minValue, int maxValue)> numberRangePairs) 240ArrayBuilder<(int, int)> numberRangePairs)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICollectionExtensions.cs (2)
16using var _ = ArrayBuilder<T>.GetInstance(out var result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICompilationExtensions.cs (4)
25var builder = ArrayBuilder<Compilation>.GetInstance(); 60var builder = ArrayBuilder<IAssemblySymbol>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (2)
407using var _ = ArrayBuilder<ISymbol>.GetInstance(out var results);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamespaceOrTypeSymbolExtensions.cs (2)
93using var _ = ArrayBuilder<INamespaceOrTypeSymbol>.GetInstance(out var stack);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (4)
427var results = ArrayBuilder<ITypeParameterSymbol>.GetInstance(); 448var results = ArrayBuilder<ITypeSymbol>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (1)
63public static void RemoveOrTransformAll<T, TArg>(this ArrayBuilder<T> list, Func<T, TArg, T?> transform, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
214using var _1 = ArrayBuilder<SyntaxNode>.GetInstance(out var commonAncestorsStack); 915using var _ = ArrayBuilder<TDirectiveTriviaSyntax>.GetInstance(out var condDirectivesBuilder);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
39var unreachableBlocksToVisit = ArrayBuilder<BasicBlock>.GetInstance(); 73ArrayBuilder<BasicBlock> unreachableBlocksToVisit,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (2)
30private readonly ArrayBuilder<BasicBlockAnalysisData> _allocatedBasicBlockAnalysisDatas; 39_allocatedBasicBlockAnalysisDatas = ArrayBuilder<BasicBlockAnalysisData>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (6)
127using var _ = ArrayBuilder<SuppressOperation>.GetInstance(out var result); 137SyntaxToken startToken, SyntaxToken endToken, SuppressOption mask, ArrayBuilder<SuppressOperation> result) 143private void AddInitialSuppressOperations(SyntaxToken token, SuppressOption mask, ArrayBuilder<SuppressOperation> result) 150using var _ = ArrayBuilder<SuppressOperation>.GetInstance(out var buffer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (4)
163using var _ = ArrayBuilder<SuppressOperation>.GetInstance(out var suppressOperationScratch); 203private static void AddOperations<T>(SegmentedList<T> operations, ArrayBuilder<T> scratch, SyntaxNode node, Action<ArrayBuilder<T>, SyntaxNode> addOperations)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
47public void AddSuppressOperations(ArrayBuilder<SuppressOperation> list, SyntaxNode currentNode)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\AbstractFormattingRule.cs (1)
23public virtual void AddSuppressOperations(ArrayBuilder<SuppressOperation> list, SyntaxNode node, in NextSuppressOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (2)
17public sealed override void AddSuppressOperations(ArrayBuilder<SuppressOperation> list, SyntaxNode node, in NextSuppressOperationAction nextOperation) 72public virtual void AddSuppressOperationsSlow(ArrayBuilder<SuppressOperation> list, SyntaxNode node, ref NextSuppressOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\NextSuppressOperationAction.cs (1)
17ArrayBuilder<SuppressOperation> list)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (21)
41private delegate LineColumnDelta Formatter<T>(LineColumn lineColumn, SyntaxTrivia trivia, ArrayBuilder<T> changes, CancellationToken cancellationToken); 46private delegate void WhitespaceAppender<T>(LineColumn lineColumn, LineColumnDelta delta, TextSpan span, ArrayBuilder<T> changes); 185protected abstract LineColumnDelta Format(LineColumn lineColumn, SyntaxTrivia trivia, ArrayBuilder<SyntaxTrivia> changes, CancellationToken cancellationToken); 190protected abstract LineColumnDelta Format(LineColumn lineColumn, SyntaxTrivia trivia, ArrayBuilder<TextChange> changes, CancellationToken cancellationToken); 240using var _ = ArrayBuilder<SyntaxTrivia>.GetInstance(out var triviaList); 260private static void AddRange(ArrayBuilder<SyntaxTrivia> result, SyntaxTriviaList triviaList) 268using var _ = ArrayBuilder<TextChange>.GetInstance(out var changes); 284private LineColumn FormatTrivia<T>(Formatter<T> formatter, WhitespaceAppender<T> whitespaceAdder, ArrayBuilder<T> changes, CancellationToken cancellationToken) 378ArrayBuilder<T> changes, 625private void AddExtraLines(int linesBetweenTokens, ArrayBuilder<SyntaxTrivia> changes) 629using var _ = ArrayBuilder<SyntaxTrivia>.GetInstance(out var lineBreaks); 642private int GetInsertionIndex(ArrayBuilder<SyntaxTrivia> changes) 675private void AddExtraLines(int linesBetweenTokens, ArrayBuilder<TextChange> changes) 713private bool TryGetMatchingChangeIndex(ArrayBuilder<TextChange> changes, out int index) 731private TextSpan GetInsertionSpan(ArrayBuilder<TextChange> changes) 758ArrayBuilder<SyntaxTrivia> changes) 767ArrayBuilder<SyntaxTrivia> changes) 826private void AddWhitespaceTextChange(LineColumn lineColumn, LineColumnDelta delta, TextSpan span, ArrayBuilder<TextChange> changes)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\TriviaHelpers.cs (2)
19using var _ = ArrayBuilder<SyntaxTrivia>.GetInstance(out var builder);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (6)
22var symbolSpecifications = ArrayBuilder<SymbolSpecification>.GetInstance(); 23var namingStyles = ArrayBuilder<NamingStyle>.GetInstance(); 24var namingRules = ArrayBuilder<SerializableNamingRule>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (6)
153var builder = ArrayBuilder<SymbolKindOrTypeKind>.GetInstance(); 246var builder = ArrayBuilder<Accessibility>.GetInstance(); 316var builder = ArrayBuilder<ModifierKind>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (4)
213using var _ = ArrayBuilder<string>.GetInstance(out var violations); 255using var _ = ArrayBuilder<string>.GetInstance(out var violations);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
292var applicableSymbolKindList = ArrayBuilder<SymbolKindOrTypeKind>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\ArrayBuilder.cs (9)
9public static PooledDisposer<ArrayBuilder<T>> GetInstance(out ArrayBuilder<T> instance) 12return new PooledDisposer<ArrayBuilder<T>>(instance); 15public static PooledDisposer<ArrayBuilder<T>> GetInstance(int capacity, out ArrayBuilder<T> instance) 18return new PooledDisposer<ArrayBuilder<T>>(instance); 21public static PooledDisposer<ArrayBuilder<T>> GetInstance(int capacity, T fillWithValue, out ArrayBuilder<T> instance) 24return new PooledDisposer<ArrayBuilder<T>>(instance);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
88using var _ = ArrayBuilder<SyntaxNode>.GetInstance(out var selectedMembers);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
25using var _ = ArrayBuilder<Location>.GetInstance(out var result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ErrorTypeSymbolKey.cs (2)
55using var _ = ArrayBuilder<string>.GetInstance(out var builder);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.PooledArrayBuilder.cs (5)
15public readonly ArrayBuilder<T> Builder; 17private PooledArrayBuilder(ArrayBuilder<T> builder) 36public ArrayBuilder<T>.Enumerator GetEnumerator() => Builder.GetEnumerator(); 39=> new(ArrayBuilder<T>.GetInstance()); 42=> new(ArrayBuilder<T>.GetInstance(capacity));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.TupleTypeSymbolKey.cs (6)
26using var _1 = ArrayBuilder<string?>.GetInstance(out var friendlyNames); 27using var _2 = ArrayBuilder<Location>.GetInstance(out var locations); 41using var _3 = ArrayBuilder<ISymbol>.GetInstance(out var elementTypes);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (2)
37/// cref="ArrayBuilder{T}.GetInstance(int, T)"/> should be used instead. 71public void AddRange(ArrayBuilder<T> values)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (2)
38using var _ = ArrayBuilder<T>.GetInstance(out var result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ICollectionExtensions.cs (1)
30public static void AddRange<T>(this ICollection<T> collection, ArrayBuilder<T>? values)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (6)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value) 79if (!dictionary.TryGetValue(key, out var builder)) 81builder = ArrayBuilder<TValue>.GetInstance(); 88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values) 91if (!dictionary.TryGetValue(key, out var builder)) 93builder = ArrayBuilder<TValue>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (10)
29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 57public static void FreeValues<K, V>(this IReadOnlyDictionary<K, ArrayBuilder<V>> builders) 66public static ImmutableArray<T> ToFlattenedImmutableArrayAndFree<T>(this ArrayBuilder<ArrayBuilder<T>> builders) 80var result = ArrayBuilder<T>.GetInstance(builders.Sum(b => b.Count)); 82foreach (var builder in builders) 96public static bool HasDuplicates<T>(this ArrayBuilder<T> builder) 99public static bool HasDuplicates<T, U>(this ArrayBuilder<T> builder, Func<T, U> selector)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (2)
46using var _ = ArrayBuilder<TItem>.GetInstance(out var items);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (2)
65using var _ = ArrayBuilder<(TDiagnosticNode diagnosticNode, Diagnostic diagnostic)>.GetInstance(out var originalNodes);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (3)
549ArrayBuilder<SyntaxToken> newModifierTokens, SyntaxTokenList modifiersList, 552using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var updatedModifiersList);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (2)
124using var _ = ArrayBuilder<SyntaxTrivia>.GetInstance(out var triviaList);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (4)
113using var _1 = ArrayBuilder<SyntaxNode>.GetInstance(out var importsToAdd); 114using var _2 = ArrayBuilder<SyntaxNode>.GetInstance(out var nodesToSimplify);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (10)
266using var _ = ArrayBuilder<ISymbol>.GetInstance(out var result); 288using var _ = ArrayBuilder<ISymbol>.GetInstance(out var result); 325var nullCheckStatements = ArrayBuilder<SyntaxNode>.GetInstance(); 326var assignStatements = ArrayBuilder<SyntaxNode>.GetInstance(); 374ArrayBuilder<SyntaxNode> nullCheckStatements, 375ArrayBuilder<SyntaxNode> assignStatements)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (8)
141using var _2 = ArrayBuilder<SyntaxNode>.GetInstance(out var expressions); 221ArrayBuilder<SyntaxNode> expressions) 279var statements = ArrayBuilder<SyntaxNode>.GetInstance(); 285using var _ = ArrayBuilder<SyntaxNode>.GetInstance(out var expressions); 323SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, Compilation compilation, ParseOptions parseOptions, SyntaxNode otherNameExpression, ArrayBuilder<SyntaxNode> expressions)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (6)
25var result = ArrayBuilder<SyntaxNode>.GetInstance(); 55var statements = ArrayBuilder<SyntaxNode>.GetInstance(); 128var statements = ArrayBuilder<SyntaxNode>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (3)
42protected abstract void AddImportDeclarations(TCompilationUnitSyntax root, ArrayBuilder<SyntaxNode> importDeclarations); 299using var _ = ArrayBuilder<SyntaxNode>.GetInstance(out var importDeclarations);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (10)
46using var isFixedDisposer = ArrayBuilder<bool>.GetInstance(names.Length, fillWithValue: false, out var isFixed); 48var result = ArrayBuilder<string>.GetInstance(names.Length); 66using var _1 = ArrayBuilder<bool>.GetInstance(names.Length, out var isFixedBuilder); 67using var _2 = ArrayBuilder<string>.GetInstance(names.Length, out var result); 84ArrayBuilder<string> names, 85ArrayBuilder<bool> isFixed,
TaskList\TaskListItemDescriptor.cs (2)
32using var _ = ArrayBuilder<TaskListItemDescriptor>.GetInstance(out var result);
Workspace\Host\DocumentService\AbstractSpanMappingService.cs (2)
35using var _ = ArrayBuilder<(string, TextChange)>.GetInstance(out var mappedFilePathAndTextChange);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (4)
395var documentsToChange = ArrayBuilder<(DocumentId, TextLoader)>.GetInstance(filePaths.Count); 566using var _ = ArrayBuilder<(DocumentId documentId, SourceTextContainer textContainer)>.GetInstance(out var documentsToOpen);
Workspace\ProjectSystem\ProjectSystemProject.cs (2)
782using var _ = ArrayBuilder<AnalyzerFileReference>.GetInstance(out var initialReferenceList);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (2)
158using var _ = ArrayBuilder<ProjectInfo>.GetInstance(out var projectInfos);
Workspace\Solution\Checksum_Factory.cs (1)
87public static Checksum Create(ArrayBuilder<Checksum> checksums)
Workspace\Solution\Solution.cs (6)
362using var _ = ArrayBuilder<ProjectInfo>.GetInstance(1, out var projectInfos); 368internal Solution AddProjects(ArrayBuilder<ProjectInfo> projectInfos) 374using var _ = ArrayBuilder<ProjectId>.GetInstance(1, out var projectIds); 380internal Solution RemoveProjects(ArrayBuilder<ProjectId> projectIds)
Workspace\Solution\SolutionCompilationState.cs (21)
319/// <inheritdoc cref="SolutionState.AddProjects(ArrayBuilder{ProjectInfo})"/> 320public SolutionCompilationState AddProjects(ArrayBuilder<ProjectInfo> projectInfos) 359public SolutionCompilationState RemoveProjects(ArrayBuilder<ProjectId> projectIds) 604using var _1 = ArrayBuilder<DocumentInfo>.GetInstance(out var addedDocumentInfos); 605using var _2 = ArrayBuilder<DocumentId>.GetInstance(out var removedDocumentInfos); 619using var _3 = ArrayBuilder<TDocumentState>.GetInstance(out var updatedDocuments); 810using var _ = ArrayBuilder<TDocumentState>.GetInstance(out var newDocumentStates); 1328using var _ = ArrayBuilder<SourceGeneratedDocumentState>.GetInstance(documents.Length, out var documentStates); 1571using var _ = ArrayBuilder<DocumentState>.GetInstance(allDocumentIds.Length, out var documentStates); 1596ArrayBuilder<DocumentState> documentStates, 1601using var _ = PooledDictionary<ProjectId, ArrayBuilder<DocumentState>>.GetInstance(out var missingDocumentStates); 1683using var _ = ArrayBuilder<T>.GetInstance(out var removedDocumentStates); 1761using var _ = ArrayBuilder<(DocumentId, SourceText)>.GetInstance(out var changedDocuments);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (8)
765using var _1 = ArrayBuilder<DocumentState>.GetInstance(out var documentsWithTreesBuilder); 784using var _ = ArrayBuilder<SyntaxTree>.GetInstance(documentsWithTrees.Length, out var alreadyParsedTrees); 873using var _ = ArrayBuilder<Diagnostic>.GetInstance(capacity: driverRunResult.Diagnostics.Length, out var builder); 1108using var _ = ArrayBuilder<Checksum>.GetInstance(out var tempChecksumArray);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (4)
117using var _1 = ArrayBuilder<DocumentId>.GetInstance(out var documentsToAddOrUpdate); 253using var _ = ArrayBuilder<SyntaxTree>.GetInstance(out var treesToRemove);
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (2)
74using var _ = ArrayBuilder<SecondaryReferencedSymbol>.GetInstance( 75compilation.ExternalReferences.Length + compilation.DirectiveReferences.Length, out var secondarySymbols);
Workspace\Solution\SolutionCompilationState.TranslationAction_Actions.cs (2)
141using var _ = ArrayBuilder<SyntaxTree>.GetInstance(documents.Length, out var syntaxTrees); 208using var _ = ArrayBuilder<SyntaxTree>.GetInstance(this.NewProjectState.DocumentStates.Count, out var syntaxTrees);
Workspace\Solution\SolutionState.cs (7)
323public SolutionState AddProjects(ArrayBuilder<ProjectInfo> projectInfos) 332using var _ = ArrayBuilder<ProjectState>.GetInstance(projectInfos.Count, out var projectStates); 370SolutionState AddProjects(ArrayBuilder<ProjectState> projectStates) 375using var _1 = ArrayBuilder<ProjectId>.GetInstance(ProjectIds.Count + projectStates.Count, out var newProjectIdsBuilder); 424public SolutionState RemoveProjects(ArrayBuilder<ProjectId> projectIds)
Workspace\Solution\SolutionState_Checksum.cs (2)
117using var _ = ArrayBuilder<Task<ProjectStateChecksums>>.GetInstance(out var projectChecksumTasks);
Workspace\Solution\SourceGeneratedDocumentIdentity.cs (2)
52using var _ = ArrayBuilder<byte>.GetInstance(capacity: (assemblyNameToHash.Length + 1 + generatorIdentity.TypeName.Length + 1 + hintName.Length) * 2 + projectIdBytes.Length, out var hashInput);
Workspace\Solution\SourceGeneratorExecutionVersion.cs (2)
108using var _ = ArrayBuilder<Checksum>.GetInstance(this.Map.Count * 2, out var checksums);
Workspace\Solution\SourceGeneratorIdentity.cs (2)
42using var _ = ArrayBuilder<SourceGeneratorIdentity>.GetInstance(out var result);
Workspace\Workspace.cs (7)
288using var _2 = ArrayBuilder<DocumentId>.GetInstance(out var addedDocumentIds); 320Solution solution, ArrayBuilder<DocumentId> addedDocumentIds) 323using var _ = ArrayBuilder<(DocumentId, DocumentState)>.GetInstance(out var relatedDocumentIdsAndStates); 704using var _ = ArrayBuilder<ProjectInfo>.GetInstance(projects.Count, out var builder);