19 references to GetInstance
Microsoft.CodeAnalysis.Workspaces (19)
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (1)
161var result = ArrayBuilder<ISymbol>.GetInstance(array.Count);
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (3)
91var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 131var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 171var builder = ArrayBuilder<TResult>.GetInstance(items.Count);
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (4)
191var builder = ArrayBuilder<TResult>.GetInstance(items.Length); 453var builder = ArrayBuilder<TResult>.GetInstance(self.Length); 1088arrayBuilder = ArrayBuilder<T>.GetInstance(capacity: 2); 1182var builder = ArrayBuilder<TNamedTypeSymbol>.GetInstance(count);
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
321arrayBuilder = ArrayBuilder<V>.GetInstance(capacity: 2);
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
98_builder = ArrayBuilder<T>.GetInstance(capacity)
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (2)
430var builder = ArrayBuilder<TResult>.GetInstance(source.Count); 443var builder = ArrayBuilder<TResult>.GetInstance(source.Count);
src\Dependencies\PooledObjects\ArrayBuilder.cs (2)
374var tmp = ArrayBuilder<U>.GetInstance(Count); 708var result = ArrayBuilder<S>.GetInstance(Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\ArrayBuilder.cs (1)
17instance = GetInstance(capacity);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.PooledArrayBuilder.cs (1)
42=> new(ArrayBuilder<T>.GetInstance(capacity));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
80var result = ArrayBuilder<T>.GetInstance(builders.Sum(b => b.Count));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
48var result = ArrayBuilder<string>.GetInstance(names.Length);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
395var documentsToChange = ArrayBuilder<(DocumentId, TextLoader)>.GetInstance(filePaths.Count);