Table of Contents

Class TrackChangeCommandBehavior<TEntityModel, TResponse>

Namespace
Arbiter.CommandQuery.Behaviors
Assembly
Arbiter.CommandQuery.dll

A behavior for tracking the changes of a model.

public class TrackChangeCommandBehavior<TEntityModel, TResponse> : PipelineBehaviorBase<EntityModelCommand<TEntityModel, TResponse>, TResponse>, IPipelineBehavior<EntityModelCommand<TEntityModel, TResponse>, TResponse> where TEntityModel : class

Type Parameters

TEntityModel

The type of the model

TResponse

The type of the response

Inheritance
PipelineBehaviorBase<EntityModelCommand<TEntityModel, TResponse>, TResponse>
TrackChangeCommandBehavior<TEntityModel, TResponse>
Implements
IPipelineBehavior<EntityModelCommand<TEntityModel, TResponse>, TResponse>
Inherited Members

Constructors

TrackChangeCommandBehavior(ILoggerFactory, IPrincipalReader)

Initializes a new instance of the TrackChangeCommandBehavior<TEntityModel, TResponse> class.

public TrackChangeCommandBehavior(ILoggerFactory loggerFactory, IPrincipalReader principalReader)

Parameters

loggerFactory ILoggerFactory

The logger factory to create an ILogger from

principalReader IPrincipalReader

The claims principal reader service.

Methods

Process(EntityModelCommand<TEntityModel, TResponse>, RequestHandlerDelegate<TResponse>, CancellationToken)

Processes the specified request with the additional behavior.

protected override ValueTask<TResponse?> Process(EntityModelCommand<TEntityModel, TResponse> request, RequestHandlerDelegate<TResponse> next, CancellationToken cancellationToken)

Parameters

request EntityModelCommand<TEntityModel, 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