AsyncEnumerableHelper.AsAsyncEnumerator Method
If task
is already completed, returns the result of the task; otherwise, returns an
instance of IAsyncEnumerator<T> which awaits the task
in
MoveNextAsync() then delegates to the enumerator from the result of the task.
Declaration
public static IAsyncEnumerator<T> AsAsyncEnumerator<T>(this Task<IAsyncEnumerator<T>> task)
Parameters
Returns
Type Parameters
If task
is already completed, returns the result of the task; otherwise, returns an
instance of IAsyncEnumerator<T> which awaits the task
in
MoveNextAsync() then delegates to the enumerator from the result of the task.
Declaration
public static IAsyncEnumerator<T> AsAsyncEnumerator<T>(this ValueTask<IAsyncEnumerator<T>> task)
Parameters
Returns
Type Parameters