Class IndexedAsyncEnumerable<T>
- Namespace
- Garyon.Objects.Enumerators
- Assembly
- Garyon.dll
An enumerable that uses the IndexedEnumerator<T> to enumerate elements of an IAsyncEnumerable<T>.
public class IndexedAsyncEnumerable<T> : IAsyncEnumerable<IndexedEnumeratorResult<T>>
Type Parameters
TThe type of elements stored in the IAsyncEnumerable<T>.
- Inheritance
-
IndexedAsyncEnumerable<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
IndexedAsyncEnumerable(IAsyncEnumerable<T>)
Initializes a new instance of the IndexedAsyncEnumerable<T> class from an IAsyncEnumerable<T>.
public IndexedAsyncEnumerable(IAsyncEnumerable<T> originalEnumerable)
Parameters
originalEnumerableIAsyncEnumerable<T>The IAsyncEnumerable<T> to enumerate with index.
Methods
GetAsyncEnumerator(CancellationToken)
Gets the IndexedAsyncEnumerator<T> that enumerates this IAsyncEnumerable<T>.
public IAsyncEnumerator<IndexedEnumeratorResult<T>> GetAsyncEnumerator(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken