Class EntityChangeNotificationBehavior<TKey, TEntityModel, TResponse>
- Namespace
- Arbiter.CommandQuery.Behaviors
- Assembly
- Arbiter.CommandQuery.dll
A behavior for sending change notifications
public class EntityChangeNotificationBehavior<TKey, TEntityModel, TResponse> : PipelineBehaviorBase<PrincipalCommandBase<TResponse>, TResponse>, IPipelineBehavior<PrincipalCommandBase<TResponse>, TResponse> where TEntityModel : class
Type Parameters
TKey
The type of the key.
TEntityModel
The type of the entity model.
TResponse
The type of the response.
- Inheritance
-
PipelineBehaviorBase<PrincipalCommandBase<TResponse>, TResponse>EntityChangeNotificationBehavior<TKey, TEntityModel, TResponse>
- Implements
-
IPipelineBehavior<PrincipalCommandBase<TResponse>, TResponse>
- Inherited Members
Constructors
EntityChangeNotificationBehavior(ILoggerFactory, IMediator)
Initializes a new instance of the EntityChangeNotificationBehavior<TKey, TEntityModel, TResponse> class.
public EntityChangeNotificationBehavior(ILoggerFactory loggerFactory, IMediator mediator)
Parameters
loggerFactory
ILoggerFactoryThe logger factory to create an ILogger from
mediator
IMediatorThe mediator.
Exceptions
Methods
Process(PrincipalCommandBase<TResponse>, RequestHandlerDelegate<TResponse>, CancellationToken)
Processes the specified request with the additional behavior.
protected override ValueTask<TResponse?> Process(PrincipalCommandBase<TResponse> request, RequestHandlerDelegate<TResponse> next, CancellationToken cancellationToken)
Parameters
request
PrincipalCommandBase<TResponse>The incoming request.
next
RequestHandlerDelegate<TResponse>Awaitable delegate for the next action in the pipeline. Eventually this delegate represents the handler.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- ValueTask<TResponse>
Awaitable task returning the
TResponse