Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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));
        }