Interface ICommandAuditPipeline
Represents an audit pipeline
Namespace: AzureFromTheTrenches.Commanding.Abstractions
Assembly: AzureFromTheTrenches.Commanding.Abstractions.dll
Syntax
public interface ICommandAuditPipeline
Methods
| Improve this Doc View SourceAudit(AuditItem, CancellationToken)
Store the supplied audit item - will get routed to the appropriate pipeline based on its type
Declaration
Task Audit(AuditItem auditQueueItem, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AuditItem | auditQueueItem | The audit item |
CancellationToken | cancellationToken | A cancellation token |
Returns
Type | Description |
---|---|
Task | An awaitable task |
AuditExecution(ICommand, ICommandDispatchContext, Int64, Boolean, CancellationToken)
Audit the command after it's execution
Declaration
Task AuditExecution(ICommand command, ICommandDispatchContext dispatchContext, long elapsedMilliseconds, bool executedSuccessfully, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ICommand | command | The command to audit |
ICommandDispatchContext | dispatchContext | The dispatch context |
System.Int64 | elapsedMilliseconds | The time taken to execute the command |
System.Boolean | executedSuccessfully | Whether or not the command was executed successfully |
CancellationToken | cancellationToken | A cancellation token |
Returns
Type | Description |
---|---|
Task | An awaitable task |
AuditPostDispatch(ICommand, ICommandDispatchContext, Int64, CancellationToken)
Audit the command using the post-dispatch pipeline
Declaration
Task AuditPostDispatch(ICommand command, ICommandDispatchContext dispatchContext, long elapsedMilliseconds, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ICommand | command | The command to audit |
ICommandDispatchContext | dispatchContext | The dispatch context |
System.Int64 | elapsedMilliseconds | The number of milliseconds that it took to dispatch the command |
CancellationToken | cancellationToken | A cancellation token |
Returns
Type | Description |
---|---|
Task | An awaitbale task |
AuditPreDispatch(ICommand, ICommandDispatchContext, CancellationToken)
Audit the command using the pre-dispatch pipeline
Declaration
Task AuditPreDispatch(ICommand command, ICommandDispatchContext dispatchContext, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ICommand | command | The command to audit |
ICommandDispatchContext | dispatchContext | The dispatch context |
CancellationToken | cancellationToken | A cancalletion token |
Returns
Type | Description |
---|---|
Task | An awaitable task |