1 instantiation of ArrayBuilder
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ArrayBuilder.cs (1)
495pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool!), size);
39 references to ArrayBuilder
Microsoft.CodeAnalysis.Debugging.Package (10)
CustomDebugInfoReader.cs (10)
130var builder = ArrayBuilder<short>.GetInstance(numCounts); 179var builder = ArrayBuilder<StateMachineHoistedLocalScope>.GetInstance(bucketCount); 245var flagsBuilder = ArrayBuilder<bool>.GetInstance(FlagBytesCount); 251var builder = ArrayBuilder<DynamicLocalInfo>.GetInstance(bucketCount); 304var builder = ArrayBuilder<TupleElementNamesInfo>.GetInstance(n); 316var builder = ArrayBuilder<string>.GetInstance(n); 398var externAliasBuilder = ArrayBuilder<string>.GetInstance(); 422var resultBuilder = ArrayBuilder<ImmutableArray<string>>.GetInstance(groupSizes.Length); 423var groupBuilder = ArrayBuilder<string>.GetInstance(); 853var builder = ArrayBuilder<byte>.GetInstance();
Microsoft.CodeAnalysis.PooledObjects.Package (29)
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);
ArrayBuilder.Enumerator.cs (2)
14private readonly ArrayBuilder<T> _builder; 17public Enumerator(ArrayBuilder<T> builder)