public static IAsyncEnumerator <T> ProcessAsynchronouslyUsingUnboundedChannel <T>(this IAsyncEnumerator <T> enumerator) => enumerator.ProcessAsynchronouslyUsingChannel(Channel.CreateUnbounded <T>(new UnboundedChannelOptions { SingleReader = true, SingleWriter = true }));
public static IAsyncEnumerator <T> ProcessAsynchronouslyUsingBoundedChannel <T>(this IAsyncEnumerator <T> enumerator, int bufferSize) => enumerator.ProcessAsynchronouslyUsingChannel(Channel.CreateBounded <T>(new BoundedChannelOptions(bufferSize) { SingleReader = true, SingleWriter = true }));