1 instantiation of ArrayBuilder
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
495pool = new ObjectPool<ArrayBuilder<T>>(() => new ArrayBuilder<T>(pool!), size);
55 references to ArrayBuilder
Microsoft.CodeAnalysis.InteractiveHost (55)
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (24)
15public static bool Any<T>(this ArrayBuilder<T> builder, Func<T, bool> predicate) 27public static bool Any<T, A>(this ArrayBuilder<T> builder, Func<T, A, bool> predicate, A arg) 39public static bool All<T>(this ArrayBuilder<T> builder, Func<T, bool> predicate) 51public static bool All<T, A>(this ArrayBuilder<T> builder, Func<T, A, bool> predicate, A arg) 71public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ArrayBuilder<TItem> items, Func<TItem, TResult> map) 91var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 111public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ArrayBuilder<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 131var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 151public static ImmutableArray<TResult> SelectAsArrayWithIndex<TItem, TArg, TResult>(this ArrayBuilder<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg) 171var builder = ArrayBuilder<TResult>.GetInstance(items.Count); 181public static void AddOptional<T>(this ArrayBuilder<T> builder, T? item) 193public static void Push<T>(this ArrayBuilder<T> builder, T e) 198public static T Pop<T>(this ArrayBuilder<T> builder) 205public static bool TryPop<T>(this ArrayBuilder<T> builder, [MaybeNullWhen(false)] out T result) 217public static T Peek<T>(this ArrayBuilder<T> builder) 222public static ImmutableArray<T> ToImmutableOrEmptyAndFree<T>(this ArrayBuilder<T>? builder) 227public static void AddIfNotNull<T>(this ArrayBuilder<T> builder, T? value) 236public static void AddIfNotNull<T>(this ArrayBuilder<T> builder, T? value) 245public static void FreeAll<T>(this ArrayBuilder<T> builder, Func<T, ArrayBuilder<T>?> getNested) 275public static void RemoveWhere<TItem, TArg>(this ArrayBuilder<TItem> builder, Func<TItem, int, TArg, bool> filter, TArg arg)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
857var resolvedParts = ArrayBuilder<string>.GetInstance();
src\Dependencies\PooledObjects\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);
src\Dependencies\PooledObjects\ArrayBuilder.Enumerator.cs (2)
14private readonly ArrayBuilder<T> _builder; 17public Enumerator(ArrayBuilder<T> builder)