1 instantiation of ArrayBuilder
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\ArrayBuilder.cs (1)
367pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool), size);
42 references to ArrayBuilder
Roslyn.Diagnostics.Analyzers (42)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ArrayBuilderExtensions.cs (1)
9public static void AddIfNotNull<T>(this ArrayBuilder<T> builder, T? item)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (4)
801using var stack = ArrayBuilder<IEnumerator<IOperation>>.GetInstance(); 893using var parameterOrderedArguments = ArrayBuilder<IArgumentOperation>.GetInstance(arguments.Length, null!);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\ArrayBuilder.cs (26)
16[DebuggerTypeProxy(typeof(ArrayBuilder<>.DebuggerProxy))] 23private readonly ArrayBuilder<T> _builder; 25public DebuggerProxy(ArrayBuilder<T> builder) 52private readonly ObjectPool<ArrayBuilder<T>>? _pool; 63private ArrayBuilder(ObjectPool<ArrayBuilder<T>>? pool) 257var tmp = ArrayBuilder<U>.GetInstance(Count); 324ObjectPool<ArrayBuilder<T>>.ForgetTrackedObject(this); 331private static readonly ObjectPool<ArrayBuilder<T>> s_poolInstance = CreatePool(); 332public static ArrayBuilder<T> GetInstance() 334var builder = s_poolInstance.Allocate(); 339public static ArrayBuilder<T> GetInstance(int capacity) 341var builder = GetInstance(); 346public static ArrayBuilder<T> GetInstance(int capacity, T fillWithValue) 348var builder = GetInstance(); 359internal static ObjectPool<ArrayBuilder<T>> CreatePool() 364internal static ObjectPool<ArrayBuilder<T>> CreatePool(int size) 366ObjectPool<ArrayBuilder<T>>? pool = null; 367pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool), size); 406var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 411if (!accumulator.TryGetValue(key, out var bucket)) 413bucket = ArrayBuilder<T>.GetInstance(); 431public void AddRange(ArrayBuilder<T> items) 436public void AddRange<U>(ArrayBuilder<U> items) where U : T 518using var result = ArrayBuilder<S>.GetInstance(Count);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\ArrayBuilder.Enumerator.cs (2)
18private readonly ArrayBuilder<T> _builder; 21public Enumerator(ArrayBuilder<T> builder)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
214using ArrayBuilder<string> namespaceNamesBuilder = ArrayBuilder<string>.GetInstance();
src\RoslynAnalyzers\Utilities\Refactoring\AbstractRefactoringHelpers`3.cs (7)
59var relevantNodesBuilder = ArrayBuilder<TSyntaxNode>.GetInstance(); 235private void AddNodesForTokenToLeft<TSyntaxNode>(ISyntaxFacts syntaxFacts, ArrayBuilder<TSyntaxNode> relevantNodesBuilder, int location, SyntaxToken tokenToLeft, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode 262private void AddNodesForTokenToRightOrIn<TSyntaxNode>(ISyntaxFacts syntaxFacts, SyntaxNode root, ArrayBuilder<TSyntaxNode> relevantNodesBuilder, int location, SyntaxToken tokenToRightOrIn, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode 300private void AddRelevantNodesForSelection<TSyntaxNode>(ISyntaxFacts syntaxFacts, SyntaxNode root, TextSpan selectionTrimmed, ArrayBuilder<TSyntaxNode> relevantNodesBuilder, CancellationToken cancellationToken) 479ArrayBuilder<TSyntaxNode> relevantNodesBuilder, 514private static void AddNonHiddenCorrectTypeNodes<TSyntaxNode>(IEnumerable<SyntaxNode> nodes, ArrayBuilder<TSyntaxNode> resultBuilder, CancellationToken cancellationToken)