ImmutableArrayExtensions ImmutableArrayExtensions ImmutableArrayExtensions ImmutableArrayExtensions Class

Definition

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)

public ref class ImmutableArrayExtensions abstract sealed
public static class ImmutableArrayExtensions
type ImmutableArrayExtensions = class
Public Module ImmutableArrayExtensions
Inheritance
ImmutableArrayExtensionsImmutableArrayExtensionsImmutableArrayExtensionsImmutableArrayExtensions

Methods

Aggregate<T>(ImmutableArray<T>, Func<T,T,T>) Aggregate<T>(ImmutableArray<T>, Func<T,T,T>) Aggregate<T>(ImmutableArray<T>, Func<T,T,T>) Aggregate<T>(ImmutableArray<T>, Func<T,T,T>)

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

Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>) Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>) Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>) Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>)

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

Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>) Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>) Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>) Aggregate<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.

All<T>(ImmutableArray<T>, Func<T,Boolean>) All<T>(ImmutableArray<T>, Func<T,Boolean>) All<T>(ImmutableArray<T>, Func<T,Boolean>) All<T>(ImmutableArray<T>, Func<T,Boolean>)

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

Any<T>(ImmutableArray<T>) Any<T>(ImmutableArray<T>) Any<T>(ImmutableArray<T>) Any<T>(ImmutableArray<T>)

Gets a value indicating whether the array contains any elements.

Any<T>(ImmutableArray<T>) Any<T>(ImmutableArray<T>) Any<T>(ImmutableArray<T>) Any<T>(ImmutableArray<T>)

Returns a value indicating whether this collection contains any elements.

Any<T>(ImmutableArray<T>, Func<T,Boolean>) Any<T>(ImmutableArray<T>, Func<T,Boolean>) Any<T>(ImmutableArray<T>, Func<T,Boolean>) Any<T>(ImmutableArray<T>, Func<T,Boolean>)

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

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

Returns the element at a specified index in the array.

ElementAtOrDefault<T>(ImmutableArray<T>, Int32) ElementAtOrDefault<T>(ImmutableArray<T>, Int32) ElementAtOrDefault<T>(ImmutableArray<T>, Int32) ElementAtOrDefault<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.

First<T>(ImmutableArray<T>) First<T>(ImmutableArray<T>) First<T>(ImmutableArray<T>) First<T>(ImmutableArray<T>)

Returns the first element in an array.

First<T>(ImmutableArray<T>) First<T>(ImmutableArray<T>) First<T>(ImmutableArray<T>) First<T>(ImmutableArray<T>)

Returns the first element in the collection.

First<T>(ImmutableArray<T>, Func<T,Boolean>) First<T>(ImmutableArray<T>, Func<T,Boolean>) First<T>(ImmutableArray<T>, Func<T,Boolean>) First<T>(ImmutableArray<T>, Func<T,Boolean>)

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

FirstOrDefault<T>(ImmutableArray<T>) FirstOrDefault<T>(ImmutableArray<T>) FirstOrDefault<T>(ImmutableArray<T>) FirstOrDefault<T>(ImmutableArray<T>)

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

FirstOrDefault<T>(ImmutableArray<T>) FirstOrDefault<T>(ImmutableArray<T>) FirstOrDefault<T>(ImmutableArray<T>) FirstOrDefault<T>(ImmutableArray<T>)

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

FirstOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) FirstOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) FirstOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) FirstOrDefault<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.

Last<T>(ImmutableArray<T>) Last<T>(ImmutableArray<T>) Last<T>(ImmutableArray<T>) Last<T>(ImmutableArray<T>)

Returns the last element in the collection.

Last<T>(ImmutableArray<T>, Func<T,Boolean>) Last<T>(ImmutableArray<T>, Func<T,Boolean>) Last<T>(ImmutableArray<T>, Func<T,Boolean>) Last<T>(ImmutableArray<T>, Func<T,Boolean>)

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

Last<T>(ImmutableArray<T>) Last<T>(ImmutableArray<T>) Last<T>(ImmutableArray<T>) Last<T>(ImmutableArray<T>)

Returns the last element of the array.

LastOrDefault<T>(ImmutableArray<T>) LastOrDefault<T>(ImmutableArray<T>) LastOrDefault<T>(ImmutableArray<T>) LastOrDefault<T>(ImmutableArray<T>)

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

LastOrDefault<T>(ImmutableArray<T>) LastOrDefault<T>(ImmutableArray<T>) LastOrDefault<T>(ImmutableArray<T>) LastOrDefault<T>(ImmutableArray<T>)

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

LastOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) LastOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) LastOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) LastOrDefault<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.

Select<T,TResult>(ImmutableArray<T>, Func<T,TResult>) Select<T,TResult>(ImmutableArray<T>, Func<T,TResult>) Select<T,TResult>(ImmutableArray<T>, Func<T,TResult>) Select<T,TResult>(ImmutableArray<T>, Func<T,TResult>)

Projects each element of a sequence into a new form.

SelectMany<TSource,TCollection,TResult>(ImmutableArray<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>) SelectMany<TSource,TCollection,TResult>(ImmutableArray<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>) SelectMany<TSource,TCollection,TResult>(ImmutableArray<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>) SelectMany<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.

SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, IEnumerable<TDerived>, IEqualityComparer<TBase>) SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, IEnumerable<TDerived>, IEqualityComparer<TBase>) SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, IEnumerable<TDerived>, IEqualityComparer<TBase>) SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, IEnumerable<TDerived>, IEqualityComparer<TBase>)

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

SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, IEqualityComparer<TBase>) SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, IEqualityComparer<TBase>) SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, IEqualityComparer<TBase>) SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, IEqualityComparer<TBase>)

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

SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, Func<TBase,TBase,Boolean>) SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, Func<TBase,TBase,Boolean>) SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, Func<TBase,TBase,Boolean>) SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, Func<TBase,TBase,Boolean>)

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

Single<T>(ImmutableArray<T>) Single<T>(ImmutableArray<T>) Single<T>(ImmutableArray<T>) Single<T>(ImmutableArray<T>)

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

Single<T>(ImmutableArray<T>, Func<T,Boolean>) Single<T>(ImmutableArray<T>, Func<T,Boolean>) Single<T>(ImmutableArray<T>, Func<T,Boolean>) Single<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.

SingleOrDefault<T>(ImmutableArray<T>) SingleOrDefault<T>(ImmutableArray<T>) SingleOrDefault<T>(ImmutableArray<T>) SingleOrDefault<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.

SingleOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) SingleOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) SingleOrDefault<T>(ImmutableArray<T>, Func<T,Boolean>) SingleOrDefault<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.

ToArray<T>(ImmutableArray<T>) ToArray<T>(ImmutableArray<T>) ToArray<T>(ImmutableArray<T>) ToArray<T>(ImmutableArray<T>)

Copies the contents of this array to a mutable array.

ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>)

Creates a dictionary based on the contents of this array.

ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>) ToDictionary<TKey,T>(ImmutableArray<T>, Func<T,TKey>, IEqualityComparer<TKey>)

Creates a dictionary based on the contents of this array.

ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>, IEqualityComparer<TKey>)

Creates a dictionary based on the contents of this array.

ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>) ToDictionary<TKey,TElement,T>(ImmutableArray<T>, Func<T,TKey>, Func<T,TElement>)

Creates a dictionary based on the contents of this array.

Where<T>(ImmutableArray<T>, Func<T,Boolean>) Where<T>(ImmutableArray<T>, Func<T,Boolean>) Where<T>(ImmutableArray<T>, Func<T,Boolean>) Where<T>(ImmutableArray<T>, Func<T,Boolean>)

Filters a sequence of values based on a predicate.

Applies to