Class ActorResourceViaQueryHandler<TQuery, TLeaf, TOwner, TResponse>
Supplies the checked actor and loaded leaf, not its authorization owners, to query business logic.
public abstract class ActorResourceViaQueryHandler<TQuery, TLeaf, TOwner, TResponse> : IQueryHandler<TQuery, TResponse> where TQuery : IQuery<TResponse>, IAuthorizeResourceVia<TOwner> where TLeaf : class where TResponse : IResult, IFailureFactory<TResponse>
Type Parameters
TQueryAn indirectly resource-authorized query; static permissions are optional.
TLeafThe reference-type leaf identified by the query and loaded by the pipeline.
TOwnerThe authorization target type at the end of the registered path.
TResponseA result-compatible response.
- Inheritance
-
ActorResourceViaQueryHandler<TQuery, TLeaf, TOwner, TResponse>
- Implements
-
IQueryHandler<TQuery, TResponse>
- Inherited Members
- Extension Methods
Methods
Handle(TQuery, CancellationToken)
public ValueTask<TResponse> Handle(TQuery query, CancellationToken cancellationToken)
Parameters
queryTQuerycancellationTokenCancellationToken
Returns
- ValueTask<TResponse>
Handle(TQuery, Actor, TLeaf, CancellationToken)
Executes query business logic with the exact checked actor and loaded leaf.
protected abstract ValueTask<TResponse> Handle(TQuery query, Actor actor, TLeaf leaf, CancellationToken cancellationToken)
Parameters
queryTQueryThe query to handle.
actorActorThe actor checked against the owner resources.
leafTLeafThe same leaf loaded by this dispatch, not its owner resources.
cancellationTokenCancellationTokenThe dispatch cancellation token.
Returns
- ValueTask<TResponse>
The business outcome.