16 lines
459 B
C#
16 lines
459 B
C#
|
using System.Threading;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace OpenHarbor.CQRS.Abstractions;
|
|||
|
|
|||
|
public interface ICommandHandler<in TCommand>
|
|||
|
where TCommand : class
|
|||
|
{
|
|||
|
Task HandleAsync(TCommand command, CancellationToken cancellationToken = default);
|
|||
|
}
|
|||
|
|
|||
|
public interface ICommandHandler<in TCommand, TCommandResult>
|
|||
|
where TCommand : class
|
|||
|
{
|
|||
|
Task<TCommandResult> HandleAsync(TCommand command, CancellationToken cancellationToken = default);
|
|||
|
}
|