1 instantiation of ArrayBuilder
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ArrayBuilder.cs (1)
495
pool = new ObjectPool<ArrayBuilder<T>>(() => new
ArrayBuilder
<T>(pool!), size);
39 references to ArrayBuilder
Microsoft.CodeAnalysis.Debugging.Package (10)
CustomDebugInfoReader.cs (10)
130
var
builder = ArrayBuilder<short>.GetInstance(numCounts);
179
var
builder = ArrayBuilder<StateMachineHoistedLocalScope>.GetInstance(bucketCount);
245
var
flagsBuilder = ArrayBuilder<bool>.GetInstance(FlagBytesCount);
251
var
builder = ArrayBuilder<DynamicLocalInfo>.GetInstance(bucketCount);
304
var
builder = ArrayBuilder<TupleElementNamesInfo>.GetInstance(n);
316
var
builder = ArrayBuilder<string>.GetInstance(n);
398
var
externAliasBuilder = ArrayBuilder<string>.GetInstance();
422
var
resultBuilder = ArrayBuilder<ImmutableArray<string>>.GetInstance(groupSizes.Length);
423
var
groupBuilder = ArrayBuilder<string>.GetInstance();
853
var
builder = ArrayBuilder<byte>.GetInstance();
Microsoft.CodeAnalysis.PooledObjects.Package (29)
ArrayBuilder.cs (27)
17
[DebuggerTypeProxy(typeof(
ArrayBuilder
<>.DebuggerProxy))]
29
private readonly
ArrayBuilder
<T> _builder;
31
public DebuggerProxy(
ArrayBuilder
<T> builder)
56
private readonly ObjectPool<
ArrayBuilder
<T>>? _pool;
67
private ArrayBuilder(ObjectPool<
ArrayBuilder
<T>> pool)
374
var
tmp =
ArrayBuilder
<U>.GetInstance(Count);
459
private static readonly ObjectPool<
ArrayBuilder
<T>> s_poolInstance = CreatePool();
460
public static
ArrayBuilder
<T> GetInstance()
462
var
builder = s_poolInstance.Allocate();
467
public static
ArrayBuilder
<T> GetInstance(int capacity)
469
var
builder = GetInstance();
474
public static
ArrayBuilder
<T> GetInstance(int capacity, T fillWithValue)
476
var
builder = GetInstance();
487
public static ObjectPool<
ArrayBuilder
<T>> CreatePool()
492
public static ObjectPool<
ArrayBuilder
<T>> CreatePool(int size)
494
ObjectPool<
ArrayBuilder
<T>>? pool = null;
495
pool = new ObjectPool<
ArrayBuilder
<T>>(() => new ArrayBuilder<T>(pool!), size);
534
var accumulator = new Dictionary<K,
ArrayBuilder
<T>>(Count, comparer);
539
if (!accumulator.TryGetValue(key, out
var
bucket))
541
bucket =
ArrayBuilder
<T>.GetInstance();
559
public void AddRange(
ArrayBuilder
<T> items)
564
public void AddRange<U>(
ArrayBuilder
<U> items, Func<U, T> selector)
572
public void AddRange<U>(
ArrayBuilder
<U> items) where U : T
577
public void AddRange<U>(
ArrayBuilder
<U> items, int start, int length) where U : T
708
var
result =
ArrayBuilder
<S>.GetInstance(Count);
ArrayBuilder.Enumerator.cs (2)
14
private readonly
ArrayBuilder
<T> _builder;
17
public Enumerator(
ArrayBuilder
<T> builder)