// Copyright (c) The Geekeey Authors // SPDX-License-Identifier: EUPL-1.2 namespace Geekeey.Request.Dispatcher; /// /// Defines a handler for processing requests of a specific type and returning a response. /// /// The type of the request to be handled. Must implement . /// The type of the response produced by the implementing request handler. public interface IScalarRequestHandler where TRequest : IScalarRequest { /// /// Processes a scalar request and returns a response asynchronously. /// /// The request object to be processed. /// A token to observe for cancellation requests. /// A task representing the asynchronous operation, containing the response of type . Task HandleAsync(TRequest request, CancellationToken cancellationToken = default); }