internal static IAsyncStep <IReadOnlyList <T> > FromTasks <T>(IEnumerable <Task <T> > tasks, int index = 0) { async Task <IReadOnlyList <T> > WhenAllTasks() => await Task.WhenAll(tasks).ConfigureAwait(false); var asnctSteps = AsyncStep.Of(WhenAllTasks); asnctSteps.Index = index; return(asnctSteps); }
internal static IAsyncStep <IReadOnlyList <T> > FromTasks <T>(IEnumerable <Task <T> > tasks) { async Task <IReadOnlyList <T> > WhenAllTasks() => await Task.WhenAll(tasks).ConfigureAwait(false); return(AsyncStep.Of(WhenAllTasks)); }