Class DeletedFilterBehaviorBase<TEntityModel, TRequest, TResponse>
- Namespace
- Arbiter.CommandQuery.Behaviors
- Assembly
- Arbiter.CommandQuery.dll
A base behavior for appending soft delete (IsDeleted) filter
public abstract class DeletedFilterBehaviorBase<TEntityModel, TRequest, TResponse> : PipelineBehaviorBase<TRequest, TResponse>, IPipelineBehavior<TRequest, TResponse> where TRequest : class, IRequest<TResponse>
Type Parameters
TEntityModel
The type of the entity model.
TRequest
The type of the request.
TResponse
The type of the response.
- Inheritance
-
PipelineBehaviorBase<TRequest, TResponse>DeletedFilterBehaviorBase<TEntityModel, TRequest, TResponse>
- Implements
-
IPipelineBehavior<TRequest, TResponse>
- Derived
- Inherited Members
Constructors
DeletedFilterBehaviorBase(ILoggerFactory)
Initializes a new instance of the DeletedFilterBehaviorBase<TEntityModel, TRequest, TResponse> class.
protected DeletedFilterBehaviorBase(ILoggerFactory loggerFactory)
Parameters
loggerFactory
ILoggerFactoryThe logger factory to create an ILogger from
Methods
HasDeletedFilter(EntityFilter?)
Determines whether the specified original filter has a soft delete (IsDeleted) filter.
protected virtual bool HasDeletedFilter(EntityFilter? originalFilter)
Parameters
originalFilter
EntityFilterThe original filter to check.
Returns
RewriteFilter(EntityFilter?, ClaimsPrincipal?)
Rewrites the specified filter to include a soft delete (IsDeleted) filter.
protected virtual EntityFilter? RewriteFilter(EntityFilter? originalFilter, ClaimsPrincipal? principal)
Parameters
originalFilter
EntityFilterThe original filter to rewrite.
principal
ClaimsPrincipalThe claims principal for this behavior.
Returns
- EntityFilter
An EntityFilter with soft delete added