namespace Prefab.Handler;
///
/// Defines a handler that processes a request and returns a response asynchronously.
///
/// Implementations of this interface encapsulate the logic required to handle a specific request and
/// produce a result. Handlers are typically used in command or query processing pipelines to separate request handling
/// logic from other application concerns.
/// The type of the response returned by the handler.
public interface IHandler
{
Task Execute(CancellationToken cancellationToken);
}
///
/// Defines a contract for handling a request and producing a response asynchronously.
///
/// Implementations of this interface should be thread-safe if they are intended to be used concurrently.
/// The interface is typically used in request/response or command/query processing pipelines.
/// The type of the request to be handled.
/// The type of the response returned after handling the request.
public interface IHandler
{
Task Execute(TRequest request, CancellationToken cancellationToken);
}