private void ExecuteStep <TStep>( TStep step, TaskDefinition task, TaskOutcome outcomeSoFar, CancellationToken cancellation, ExecutionEventsBag eventsBag) where TStep : ITaskStep { var stepExecutor = _taskStepExecutorResolver.Resolve <TStep>(); var context = new TaskStepExecutionContext( task, eventsBag, outcomeSoFar); stepExecutor.Execute(step, context, cancellation); }
private void ExecuteStep <TStep>( TStep step, TaskDefinition task, IProgress <TaskProgress> progress, CancellationToken cancellation) where TStep : ITaskStep { var stepExecutor = _taskStepExecutorResolver.Resolve <TStep>(); var context = new TaskStepExecutionContext { Task = task, EventsBag = _executionEventsBag }; var stepProgress = new SynchronousProgress <byte>( x => progress.Report(new TaskProgress { StepName = step.Name, ProgressPercentage = x })); stepExecutor.Execute(step, context, stepProgress, cancellation); }