ImmutableArray<T>.Builder Class

 

A writable array accessor that can be converted into an ImmutableArray<T> instance without allocating extra memory.

NuGet package: System.Collections.Immutable (about immutable collections and how to install)

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

System.Object
  System.Collections.Immutable.ImmutableArray<T>.Builder

[DebuggerDisplayAttribute("Count = {Count}")]
[DefaultMemberAttribute("Item")]
public sealed class Builder : IList<T>, ICollection<T>, IReadOnlyList<T>, 
	IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable

NameDescription
System_CAPS_pubpropertyCount

Gets or sets the number of items in the array.

System_CAPS_pubpropertyItem[Int32]

Gets or sets the item at the specified index.

NameDescription
System_CAPS_pubmethodAdd(T)

Adds the specified item to the array.

System_CAPS_pubmethodAddRange(T[])

Adds the specified items to the end of the array.

System_CAPS_pubmethodAddRange(T[], Int32)

Adds the specified items to the end of the array.

System_CAPS_pubmethodAddRange(IEnumerable<T>)

Adds the specified items to the end of the array.

System_CAPS_pubmethodAddRange(ImmutableArray<T>)

Adds the specified items to the end of the array.

System_CAPS_pubmethodAddRange(ImmutableArray<T>, Int32)

Adds the specified items to the end of the array.

System_CAPS_pubmethodAddRange(ImmutableArray<T>.Builder)

Adds the specified items to the end of the array.

System_CAPS_pubmethodAddRange<TDerived>(TDerived[])

Adds the specified items that derive from the type currently in the array, to the end of the array.

System_CAPS_pubmethodAddRange<TDerived>(ImmutableArray<TDerived>)

Adds the specified items that derive from the type currently in the array, to the end of the array

System_CAPS_pubmethodAddRange<TDerived>(ImmutableArray<TDerived>.Builder)

Adds the specified items that derive from the type currently in the array, to the end of the array.

System_CAPS_pubmethodClear()

Removes all items from the array.

System_CAPS_pubmethodContains(T)

Determines whether the array contains a specific value.

System_CAPS_pubmethodCopyTo(T[], Int32)

Copies the current contents to the specified array.

System_CAPS_pubmethodEnsureCapacity(Int32)

Resizes the array to accommodate the specified capacity requirement.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

Gets an object that can be used to iterate through the collection.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIndexOf(T)

Determines the index of a specific item in the array.

System_CAPS_pubmethodIndexOf(T, Int32)

Determines the index of the specified item.

System_CAPS_pubmethodIndexOf(T, Int32, Int32)

Determines the index of the specified item.

System_CAPS_pubmethodIndexOf(T, Int32, Int32, IEqualityComparer<T>)

Determines the index for the specified item.

System_CAPS_pubmethodInsert(Int32, T)

Inserts an item in the array at the specified index.

System_CAPS_pubmethodLastIndexOf(T)

Determines the 0-based index of the last occurrence of the specified item in this array.

System_CAPS_pubmethodLastIndexOf(T, Int32)

Determines the 0-based index of the last occurrence of the specified item in this array.

System_CAPS_pubmethodLastIndexOf(T, Int32, Int32)

Determines the 0-based index of the last occurrence of the specified item in this array.

System_CAPS_pubmethodLastIndexOf(T, Int32, Int32, IEqualityComparer<T>)

Determines the 0-based index of the last occurrence of the specified item in this array.

System_CAPS_pubmethodRemove(T)

Removes the specified element.

System_CAPS_pubmethodRemoveAt(Int32)

Removes the item at the specified index from the array.

System_CAPS_pubmethodReverseContents()

Reverses the order of elements in the array.

System_CAPS_pubmethodSort()

Sorts the contents of the array.

System_CAPS_pubmethodSort(IComparer<T>)

Sorts the contents of the array.

System_CAPS_pubmethodSort(Int32, Int32, IComparer<T>)

Sorts the contents of the array.

System_CAPS_pubmethodToArray()

Creates a new array with the current contents of this ImmutableArray<T>.Builder.

System_CAPS_pubmethodToImmutable()

Returns an immutable array that contains the current contents of this ImmutableArray<T>.Builder.

System_CAPS_pubmethodToString()

(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable<T>.GetEnumerator()

Returns an enumerator that iterates through the array.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an enumerator that iterates through the array.

NameDescription
System_CAPS_pubmethodToImmutableArray<T>()

Creates an immutable array from the specified collection.(Defined by ImmutableArray.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey>(Func<T, TKey>)

Overloaded. Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey>(Func<T, TKey>, IEqualityComparer<TKey>)

Overloaded. Constructs an immutable dictionary based on some transformation of a sequence.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>, IEqualityComparer<TKey>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers.(Defined by ImmutableDictionary.)

System_CAPS_pubmethodToImmutableHashSet<T>()

Overloaded. Enumerates a sequence and produces an immutable hash set of its contents.(Defined by ImmutableHashSet.)

System_CAPS_pubmethodToImmutableHashSet<T>(IEqualityComparer<T>)

Overloaded. Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.(Defined by ImmutableHashSet.)

System_CAPS_pubmethodToImmutableList<T>()

Enumerates a sequence and produces an immutable list of its contents.(Defined by ImmutableList.)

System_CAPS_pubmethodToImmutableSortedDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>, IComparer<TKey>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedDictionary<T, TKey, TValue>(Func<T, TKey>, Func<T, TValue>, IComparer<TKey>, IEqualityComparer<TValue>)

Overloaded. Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers.(Defined by ImmutableSortedDictionary.)

System_CAPS_pubmethodToImmutableSortedSet<T>()

Overloaded. Enumerates a sequence and produces an immutable sorted set of its contents.(Defined by ImmutableSortedSet.)

System_CAPS_pubmethodToImmutableSortedSet<T>(IComparer<T>)

Overloaded. Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.(Defined by ImmutableSortedSet.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: