dotnet-cqrs/PoweredSoft.CQRS.Abstractions/ICommandHandler.cs

19 lines
511 B
C#
Raw Normal View History

2021-02-01 23:31:07 -05:00
using System;
using System.Threading;
using System.Threading.Tasks;
namespace PoweredSoft.CQRS.Abstractions
{
public interface ICommandHandler<TCommand>
where TCommand : class
{
Task HandleAsync(TCommand command, CancellationToken cancellationToken = default);
}
public interface ICommandHandler<TCommand, TCommandResult>
where TCommand : class
{
Task<TCommandResult> HandleAsync(TCommand command, CancellationToken cancellationToken = default);
}
}