Interface IQueryHandler
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Abstractions.Data
Assembly: Cephalon.Abstractions.dll
Handles a read-side request and returns the requested result.
public interface IQueryHandler<in TQuery, TResult> where TQuery : IQuery<TResult>Type Parameters
Section titled “Type Parameters”TQuery
The query type handled by the contract.
TResult
The result type returned by the query.
Methods
Section titled “Methods”HandleAsync(TQuery, CancellationToken)
Section titled “ HandleAsync(TQuery, CancellationToken)”Handles the supplied query.
ValueTask<TResult> HandleAsync(TQuery query, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”query TQuery
The query to execute.
cancellationToken CancellationToken
The token that cancels the operation.
Returns
Section titled “Returns”ValueTask<TResult>
A task that completes with the result produced by the query.