Interface ICancellableCommandHandler<TCommand, TResult>
Can be implemented to provide basic command handling capabilites where a result and cancellation token support is required
Namespace: AzureFromTheTrenches.Commanding.Abstractions
Assembly: AzureFromTheTrenches.Commanding.Abstractions.dll
Syntax
public interface ICancellableCommandHandler<in TCommand, TResult> : ICancellableCommandHandler, ICommandHandler, ICommandHandlerBase where TCommand : ICommand<TResult>
Type Parameters
Name | Description |
---|---|
TCommand | The type of the command |
TResult | The result type of the command |
Methods
| Improve this Doc View SourceExecuteAsync(TCommand, TResult, CancellationToken)
Executes the command
Declaration
Task<TResult> ExecuteAsync(TCommand command, TResult previousResult, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
TCommand | command | The command |
TResult | previousResult | The previous result set by the last (if any) command in the handler chain. Will be default(TResult) if the first command in the pipeline. |
CancellationToken | cancellationToken | A cancellation token |
Returns
Type | Description |
---|---|
Task<TResult> | An awaitable task |