System.Linq.Async by .NET Foundation and Contributors

<PackageReference Include="System.Linq.Async" Version="6.0.1" />

.NET API 1,116,304 bytes

 IAsyncPartition<TElement>

interface IAsyncPartition<TElement> : IAsyncIListProvider<TElement>, IAsyncEnumerable<TElement>
An iterator that supports random access and can produce a partial sequence of its items through an optimized path.
IAsyncPartition<TElement> Skip(int count)

Creates a new partition that skips the specified number of elements from this sequence.

IAsyncPartition<TElement> Take(int count)

Creates a new partition that takes the specified number of elements from this sequence.

ValueTask<Maybe<TElement>> TryGetElementAtAsync(int index, CancellationToken cancellationToken)

Gets the item associated with a 0-based index in this sequence.

ValueTask<Maybe<TElement>> TryGetFirstAsync(CancellationToken cancellationToken)

Gets the first item in this sequence.

ValueTask<Maybe<TElement>> TryGetLastAsync(CancellationToken cancellationToken)

Gets the last item in this sequence.