#region ========================================================================= USING ===================================================================================== using System.Threading; using System.Threading.Tasks; #endregion namespace Lumina.Application.Common.CQRS; /// /// Defines a contract for handling commands in the application layer. /// Commands represent operations that modify application state. /// /// The type of command to handle. /// The type of result returned after handling the command. public interface ICommandHandler where TCommand : ICommand { /// /// Handles the specified command and returns a result. /// /// The command to handle. /// Token to monitor for cancellation requests. /// A task that represents the asynchronous operation, containing the result of the command execution. Task HandleAsync(TCommand command, CancellationToken cancellationToken = default); }