Collection
Provides utility methods to work with collections.
Represents a wrapped for method TryTake
in the form of enumerable collection.
Adds multiple items into collection.
Adds items to the end of collection.
public static ReadOnlyCollectionView<TInput, TOutput> Convert<TInput, TOutput>(this IReadOnlyCollection<TInput> collection, Converter<TInput, TOutput> converter)
Returns lazily converted read-only collection.
public static MemoryOwner<T> Copy<T>(this IEnumerable<T> enumerable, int sizeHint = 0, MemoryAllocator<T> allocator = null)
Creates a copy of the elements from the collection.
Obtains element at the specified index in the sequence.
Applies specified action to each collection element.
public static ValueTask ForEachAsync<T>(this IEnumerable<T> collection, Func<T, CancellationToken, ValueTask> action, CancellationToken token = default)
Applies the specified asynchronous action to each collection element.
Gets consumer of thread-safe concurrent collection.
Adds items to the beginning of collection.
Computes hash code for the sequence of objects.
Skip null values in the collection.
Converts collection into single-dimensional array.
Converts read-only collection into single-dimensional array.
Converts synchronous collection of elements to asynchronous.
public static string ToString<T>(this IEnumerable<T> collection, string delimiter, string ifEmpty = "")
Concatenates each element from the collection into single string.