Interface IMessagingBehavior
Application service for message processing interception.
Namespace: Kephas.Messaging.Behaviors
Assembly: Kephas.Messaging.dll
Syntax
public interface IMessagingBehavior
Methods
| Improve this Doc View SourceAfterProcessAsync(IMessagingContext, CancellationToken)
Interception called after invoking the handler to process the message.
Declaration
Task AfterProcessAsync(IMessagingContext context, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
IMessagingContext | context | The processing context. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task. |
Remarks
The context will contain the response returned by the handler. The interceptor may change the response or even replace it with another one.
BeforeProcessAsync(IMessagingContext, CancellationToken)
Interception called before invoking the handler to process the message.
Declaration
Task BeforeProcessAsync(IMessagingContext context, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
IMessagingContext | context | The processing context. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task. |