Skip to content

IQueryHandler<TQuery, TResult> interface

Namespace: Vitreous.Abstractions
Assembly: Vitreous.dll

Handles a query that reads state and returns a value of type TResult.

public interface IQueryHandler<TQuery, TResult> where TQuery : IQuery<TResult>

TQuery

The query type.

TResult

The success value type.

Handles the given query and returns a result.

ValueTask<Result<TResult>> Handle(TQuery query, CancellationToken ct = default)

query TQuery

ct CancellationToken

ValueTask<Result<TResult>>