Share via


ArrayBuilder<T> Class

Definition

generic <typename T>
public ref class ArrayBuilder sealed : System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IReadOnlyCollection<T>, System::Collections::Generic::IReadOnlyList<T>
[System.Diagnostics.DebuggerDisplay("Count = {Count,nq}")]
[System.Diagnostics.DebuggerTypeProxy(typeof(Microsoft.VisualStudio.Utilities.ArrayBuilder<>+DebuggerProxy))]
public sealed class ArrayBuilder<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.IReadOnlyList<T>
[<System.Diagnostics.DebuggerDisplay("Count = {Count,nq}")>]
[<System.Diagnostics.DebuggerTypeProxy(typeof(Microsoft.VisualStudio.Utilities.ArrayBuilder<>+DebuggerProxy))>]
type ArrayBuilder<'T> = class
    interface IReadOnlyCollection<'T>
    interface seq<'T>
    interface IEnumerable
    interface IReadOnlyList<'T>
Public NotInheritable Class ArrayBuilder(Of T)
Implements IEnumerable(Of T), IReadOnlyCollection(Of T), IReadOnlyList(Of T)

Type Parameters

T
Inheritance
ArrayBuilder<T>
Attributes
Implements

Constructors

Name Description
ArrayBuilder<T>()
ArrayBuilder<T>(Int32)

Properties

Name Description
Count
Item[Int32]

Methods

Name Description
Add(T)
AddMany(T, Int32)
AddRange(ArrayBuilder<T>)
AddRange(IEnumerable<T>)
AddRange(ImmutableArray<T>, Int32, Int32)
AddRange(ImmutableArray<T>, Int32)
AddRange(ImmutableArray<T>)
AddRange(T[], Int32, Int32)
AddRange(T[], Int32)
AddRange(T[])
AddRange<S>(ImmutableArray<S>)
AddRange<U>(ArrayBuilder<U>, Func<U,T>)
AddRange<U>(ArrayBuilder<U>, Int32, Int32)
AddRange<U>(ArrayBuilder<U>)
Any()
Clear()
Clip(Int32)
Contains(T)
CopyTo(T[], Int32)
CreatePool()
CreatePool(Int32)
EnsureCapacity(Int32)
FindIndex(Int32, Int32, Predicate<T>)
FindIndex(Int32, Predicate<T>)
FindIndex(Predicate<T>)
FindIndex<TArg>(Func<T,TArg,Boolean>, TArg)
FindIndex<TArg>(Int32, Func<T,TArg,Boolean>, TArg)
FindIndex<TArg>(Int32, Int32, Func<T,TArg,Boolean>, TArg)
First()
Free()
GetEnumerator()
GetInstance()
GetInstance(Int32, T)
GetInstance(Int32)
IndexOf(T, IEqualityComparer<T>)
IndexOf(T, Int32, Int32)
IndexOf(T)
Insert(Int32, T)
Last()
Remove(T)
RemoveAt(Int32)
RemoveDuplicates()
RemoveLast()
ReverseContents()
SelectDistinct<S>(Func<T,S>)
SetItem(Int32, T)

Write value to slot index. Fills in unallocated slots preceding the index, if any.

Sort()
Sort(Comparison<T>)
Sort(IComparer<T>)
Sort(Int32, IComparer<T>)
SortAndRemoveDuplicates(IComparer<T>)
ToArray()
ToArrayAndFree()
ToDowncastedImmutable<U>()

Realizes the array, downcasting each element to a derived type.

ToImmutable()

Realizes the array.

ToImmutableAndClear()

Realizes the array and clears the collection.

ToImmutableAndFree()

Realizes the array and disposes the builder in one operation.

ToImmutableOrNull()

Realizes the array.

ZeroInit(Int32)

Explicit Interface Implementations

Name Description
IEnumerable.GetEnumerator()
IEnumerable<T>.GetEnumerator()

Extension Methods

Name Description
EmptyIfNull<T>(IEnumerable<T>)

Return this enumeration in case it is not null. In case it is null return empty enumeration.

Applies to