OperationWorkflowBase<TWorkflow, TArguments, TResult>
Namespace: SnowBank.Threading.Operations · class
Implements: IOperationWorkflow<TWorkflow, TArguments, TResult>, IOperationWorkflow<TArguments, TResult>, IOperationWorkflow
Generic implementation for Workflows
Methods
CreateInstance
static TWorkflow CreateInstance(IServiceProvider services, IOperationContext ctx)
Creates a new instance of this workflow, using an already created operation context.
services— Provider that can be used to instantiate this workflowctx— Context that will run this operation
Returns: New workflow instance that is ready to run an operation using the specified context.
static TWorkflow CreateInstance(IServiceProvider services, string name, IOperationScheduler scheduler, CancellationToken ct)
Creates a new instance of this workflow
services— Provider that can be used to instantiate this workflowname— Name of the workflowscheduler— Scheduler that will be used to run this operationct— Token that can be used to cancel this operation
Returns: New workflow instance that is ready to run an operation using a newly created context.
ExecuteAsync
Task<OperationResult<TResult>> ExecuteAsync(TArguments arguments)