예제 #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);
        }
예제 #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));
        }