Exemplo n.º 1
0
        protected override async Task <State> ExecuteCurrentStateAsync(State state, CancellationToken cancellationToken)
        {
            var states  = stateFactory.CreateStates(state);
            var tasks   = states.Select(x => activity.ExecuteAsync(x, cancellationToken));
            var results = await Task.WhenAll(tasks);

            return(state.SetValue(results));
        }