ImmutableArrayExtensions Class

 

LINQ extension method overrides that offer greater efficiency for ImmutableArray<T> than the standard LINQ methods

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

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

System::Object
  System.Linq::ImmutableArrayExtensions

[ExtensionAttribute]
public ref class ImmutableArrayExtensions abstract sealed 

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAggregate<T>(ImmutableArray<T>, Func<T, T, T>^)

Applies a function to a sequence of elements in a cumulative way.

System_CAPS_pubmethodSystem_CAPS_staticAggregate<TAccumulate, T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate, T, TAccumulate>^)

Applies a function to a sequence of elements in a cumulative way.

System_CAPS_pubmethodSystem_CAPS_staticAggregate<TAccumulate, TResult, T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate, T, TAccumulate>^, Func<TAccumulate, TResult>^)

Applies a function to a sequence of elements in a cumulative way.

System_CAPS_pubmethodSystem_CAPS_staticAll<T>(ImmutableArray<T>, Func<T, Boolean>^)

Gets a value indicating whether all elements in this array match a given condition.

System_CAPS_pubmethodSystem_CAPS_staticAny<T>(ImmutableArray<T>)

Gets a value indicating whether the array contains any elements.

System_CAPS_pubmethodSystem_CAPS_staticAny<T>(ImmutableArray<T>, Func<T, Boolean>^)

Gets a value indicating whether the array contains any elements that match a specified condition.

System_CAPS_pubmethodSystem_CAPS_staticAny<T>(ImmutableArray<T>::Builder^)

Returns a value indicating whether this collection contains any elements.

System_CAPS_pubmethodSystem_CAPS_staticElementAt<T>(ImmutableArray<T>, Int32)

Returns the element at a specified index in the array.

System_CAPS_pubmethodSystem_CAPS_staticElementAtOrDefault<T>(ImmutableArray<T>, Int32)

Returns the element at a specified index in a sequence or a default value if the index is out of range.

System_CAPS_pubmethodSystem_CAPS_staticFirst<T>(ImmutableArray<T>)

Returns the first element in an array.

System_CAPS_pubmethodSystem_CAPS_staticFirst<T>(ImmutableArray<T>, Func<T, Boolean>^)

Returns the first element in a sequence that satisfies a specified condition.

System_CAPS_pubmethodSystem_CAPS_staticFirst<T>(ImmutableArray<T>::Builder^)

Returns the first element in the collection.

System_CAPS_pubmethodSystem_CAPS_staticFirstOrDefault<T>(ImmutableArray<T>)

Returns the first element of a sequence, or a default value if the sequence contains no elements.

System_CAPS_pubmethodSystem_CAPS_staticFirstOrDefault<T>(ImmutableArray<T>, Func<T, Boolean>^)

Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.

System_CAPS_pubmethodSystem_CAPS_staticFirstOrDefault<T>(ImmutableArray<T>::Builder^)

Returns the first element in the collection, or the default value if the collection is empty.

System_CAPS_pubmethodSystem_CAPS_staticLast<T>(ImmutableArray<T>)

Returns the last element of the array.

System_CAPS_pubmethodSystem_CAPS_staticLast<T>(ImmutableArray<T>, Func<T, Boolean>^)

Returns the last element of a sequence that satisfies a specified condition.

System_CAPS_pubmethodSystem_CAPS_staticLast<T>(ImmutableArray<T>::Builder^)

Returns the last element in the collection.

System_CAPS_pubmethodSystem_CAPS_staticLastOrDefault<T>(ImmutableArray<T>)

Returns the last element of a sequence, or a default value if the sequence contains no elements.

System_CAPS_pubmethodSystem_CAPS_staticLastOrDefault<T>(ImmutableArray<T>, Func<T, Boolean>^)

Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.

System_CAPS_pubmethodSystem_CAPS_staticLastOrDefault<T>(ImmutableArray<T>::Builder^)

Returns the last element in the collection, or the default value if the collection is empty.

System_CAPS_pubmethodSystem_CAPS_staticSelect<T, TResult>(ImmutableArray<T>, Func<T, TResult>^)

Projects each element of a sequence into a new form.

System_CAPS_pubmethodSystem_CAPS_staticSelectMany<TSource, TCollection, TResult>(ImmutableArray<TSource>, Func<TSource, IEnumerable<TCollection>^>^, Func<TSource, TCollection, TResult>^)

Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein.

System_CAPS_pubmethodSystem_CAPS_staticSequenceEqual<TDerived, TBase>(ImmutableArray<TBase>, IEnumerable<TDerived>^, IEqualityComparer<TBase>^)

Determines whether two sequences are equal according to an equality comparer.

System_CAPS_pubmethodSystem_CAPS_staticSequenceEqual<TDerived, TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, Func<TBase, TBase, Boolean>^)

Determines whether two sequences are equal according to an equality comparer.

System_CAPS_pubmethodSystem_CAPS_staticSequenceEqual<TDerived, TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, IEqualityComparer<TBase>^)

Determines whether two sequences are equal according to an equality comparer.

System_CAPS_pubmethodSystem_CAPS_staticSingle<T>(ImmutableArray<T>)

Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.

System_CAPS_pubmethodSystem_CAPS_staticSingle<T>(ImmutableArray<T>, Func<T, Boolean>^)

Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.

System_CAPS_pubmethodSystem_CAPS_staticSingleOrDefault<T>(ImmutableArray<T>)

Returns the only element of the array, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.

System_CAPS_pubmethodSystem_CAPS_staticSingleOrDefault<T>(ImmutableArray<T>, Func<T, Boolean>^)

Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.

System_CAPS_pubmethodSystem_CAPS_staticToArray<T>(ImmutableArray<T>)

Copies the contents of this array to a mutable array.

System_CAPS_pubmethodSystem_CAPS_staticToDictionary<TKey, T>(ImmutableArray<T>, Func<T, TKey>^)

Creates a dictionary based on the contents of this array.

System_CAPS_pubmethodSystem_CAPS_staticToDictionary<TKey, T>(ImmutableArray<T>, Func<T, TKey>^, IEqualityComparer<TKey>^)

Creates a dictionary based on the contents of this array.

System_CAPS_pubmethodSystem_CAPS_staticToDictionary<TKey, TElement, T>(ImmutableArray<T>, Func<T, TKey>^, Func<T, TElement>^)

Creates a dictionary based on the contents of this array.

System_CAPS_pubmethodSystem_CAPS_staticToDictionary<TKey, TElement, T>(ImmutableArray<T>, Func<T, TKey>^, Func<T, TElement>^, IEqualityComparer<TKey>^)

Creates a dictionary based on the contents of this array.

System_CAPS_pubmethodSystem_CAPS_staticWhere<T>(ImmutableArray<T>, Func<T, Boolean>^)

Filters a sequence of values based on a predicate.

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: