1 instantiation of ArrayBuilder
Microsoft.CodeAnalysis.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\ArrayBuilder.cs (1)
367
pool = new ObjectPool<ArrayBuilder<T>>(() => new
ArrayBuilder
<T>(pool), size);
37 references to ArrayBuilder
Microsoft.CodeAnalysis.Analyzers (37)
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (2)
131
using
var
textChanges =
ArrayBuilder
<TextChange>.GetInstance(fixInfos.Count);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ArrayBuilderExtensions.cs (1)
9
public static void AddIfNotNull<T>(this
ArrayBuilder
<T> builder, T? item)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (4)
801
using
var
stack =
ArrayBuilder
<IEnumerator<IOperation>>.GetInstance();
893
using
var
parameterOrderedArguments =
ArrayBuilder
<IArgumentOperation>.GetInstance(arguments.Length, null!);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\ArrayBuilder.cs (26)
16
[DebuggerTypeProxy(typeof(
ArrayBuilder
<>.DebuggerProxy))]
23
private readonly
ArrayBuilder
<T> _builder;
25
public DebuggerProxy(
ArrayBuilder
<T> builder)
52
private readonly ObjectPool<
ArrayBuilder
<T>>? _pool;
63
private ArrayBuilder(ObjectPool<
ArrayBuilder
<T>>? pool)
257
var
tmp =
ArrayBuilder
<U>.GetInstance(Count);
324
ObjectPool<
ArrayBuilder
<T>>.ForgetTrackedObject(this);
331
private static readonly ObjectPool<
ArrayBuilder
<T>> s_poolInstance = CreatePool();
332
public static
ArrayBuilder
<T> GetInstance()
334
var
builder = s_poolInstance.Allocate();
339
public static
ArrayBuilder
<T> GetInstance(int capacity)
341
var
builder = GetInstance();
346
public static
ArrayBuilder
<T> GetInstance(int capacity, T fillWithValue)
348
var
builder = GetInstance();
359
internal static ObjectPool<
ArrayBuilder
<T>> CreatePool()
364
internal static ObjectPool<
ArrayBuilder
<T>> CreatePool(int size)
366
ObjectPool<
ArrayBuilder
<T>>? pool = null;
367
pool = new ObjectPool<
ArrayBuilder
<T>>(() => new ArrayBuilder<T>(pool), size);
406
var accumulator = new Dictionary<K,
ArrayBuilder
<T>>(Count, comparer);
411
if (!accumulator.TryGetValue(key, out
var
bucket))
413
bucket =
ArrayBuilder
<T>.GetInstance();
431
public void AddRange(
ArrayBuilder
<T> items)
436
public void AddRange<U>(
ArrayBuilder
<U> items) where U : T
518
using
var
result =
ArrayBuilder
<S>.GetInstance(Count);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\ArrayBuilder.Enumerator.cs (2)
18
private readonly
ArrayBuilder
<T> _builder;
21
public Enumerator(
ArrayBuilder
<T> builder)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
214
using
ArrayBuilder
<string> namespaceNamesBuilder =
ArrayBuilder
<string>.GetInstance();