Table of Contents

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
EntityChangeNotificationBehavior<TKey, TEntityModel, TResponse>
Implements
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 ILoggerFactory

The logger factory to create an ILogger from

mediator IMediator

The mediator.

Exceptions

ArgumentNullException

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 CancellationToken

The cancellation token.

Returns

ValueTask<TResponse>

Awaitable task returning the TResponse