Exemplo n.º 1
0
 public static IAsyncEnumerable <R> BlockDo <T, R>(this IAsyncEnumerable <T> source,
                                                   Func <T, Task <R> > func, int parallel = 1, int?capacity = null, CancellationToken cancel = default) =>
 source.BlockDo((r, _) => func(r), parallel, capacity, cancel);
Exemplo n.º 2
0
 public static Task <long> BlockDo <T>(this IAsyncEnumerable <T> source, Func <T, Task> action, int parallel = 1, int?capacity = null,
                                       CancellationToken cancel = default) => source.BlockDo((o, _) => action(o), parallel, capacity, cancel);