Rackspace.Collections.Immutable by Sam Harwell

<PackageReference Include="Rackspace.Collections.Immutable" Version="1.1.36" />

 ImmutableArrayExtensions

public static class ImmutableArrayExtensions
LINQ extension method overrides that offer greater efficiency for ImmutableArray<T> than the standard LINQ methods
public static T Aggregate<T>(this ImmutableArray<T> immutableArray, Func<T, T, T> func)

Applies an accumulator function over a sequence.

public static TAccumulate Aggregate<TAccumulate, T>(this ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> func)

Applies an accumulator function over a sequence.

public static TResult Aggregate<TAccumulate, TResult, T>(this ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> func, Func<TAccumulate, TResult> resultSelector)

Applies an accumulator function over a sequence.

public static bool All<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate)

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

public static bool Any<T>(this ImmutableArray<T> immutableArray)

Gets a value indicating whether any elements are in this collection.

public static bool Any<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate)

Gets a value indicating whether any elements are in this collection that match a given condition.

public static bool Any<T>(this Builder<T> builder)

public static T ElementAt<T>(this ImmutableArray<T> immutableArray, int index)

Returns the element at a specified index in a sequence.

public static T ElementAtOrDefault<T>(this ImmutableArray<T> immutableArray, int index)

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

public static T First<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate)

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

public static T First<T>(this ImmutableArray<T> immutableArray)

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

public static T First<T>(this Builder<T> builder)

public static T FirstOrDefault<T>(this ImmutableArray<T> immutableArray)

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

public static T FirstOrDefault<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate)

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

public static T FirstOrDefault<T>(this Builder<T> builder)

public static T Last<T>(this ImmutableArray<T> immutableArray)

Returns the last element of a sequence.

public static T Last<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate)

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

public static T Last<T>(this Builder<T> builder)

public static T LastOrDefault<T>(this ImmutableArray<T> immutableArray)

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

public static T LastOrDefault<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate)

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

public static T LastOrDefault<T>(this Builder<T> builder)

public static IEnumerable<TResult> Select<T, TResult>(this ImmutableArray<T> immutableArray, Func<T, TResult> selector)

Projects each element of a sequence into a new form.

public static IEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this ImmutableArray<TSource> immutableArray, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector)

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.

public static bool SequenceEqual<TDerived, TBase>(this ImmutableArray<TBase> immutableArray, ImmutableArray<TDerived> items, IEqualityComparer<TBase> comparer = null) where TDerived : TBase

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

public static bool SequenceEqual<TDerived, TBase>(this ImmutableArray<TBase> immutableArray, IEnumerable<TDerived> items, IEqualityComparer<TBase> comparer = null) where TDerived : TBase

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

public static bool SequenceEqual<TDerived, TBase>(this ImmutableArray<TBase> immutableArray, ImmutableArray<TDerived> items, Func<TBase, TBase, bool> predicate) where TDerived : TBase

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

public static T Single<T>(this ImmutableArray<T> immutableArray)

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

public static T Single<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate)

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

public static T SingleOrDefault<T>(this ImmutableArray<T> immutableArray)

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

public static T SingleOrDefault<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate)

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.

public static T[] ToArray<T>(this ImmutableArray<T> immutableArray)

Copies the contents of this array to a mutable array.

public static Dictionary<TKey, T> ToDictionary<TKey, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector)

Creates a dictionary based on the contents of this array.

public static Dictionary<TKey, TElement> ToDictionary<TKey, TElement, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector, Func<T, TElement> elementSelector)

Creates a dictionary based on the contents of this array.

public static Dictionary<TKey, T> ToDictionary<TKey, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector, IEqualityComparer<TKey> comparer)

Creates a dictionary based on the contents of this array.

public static Dictionary<TKey, TElement> ToDictionary<TKey, TElement, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector, Func<T, TElement> elementSelector, IEqualityComparer<TKey> comparer)

Creates a dictionary based on the contents of this array.

public static IEnumerable<T> Where<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate)

Filters a sequence of values based on a predicate.