namespace Elsa.Mediator.Contracts; /// /// Sends a command. /// public interface ICommandSender { /// /// Sends a command using the default strategy. /// Task SendAsync(ICommand command, CancellationToken cancellationToken = default); /// /// Sends a command using the default strategy. /// /// The command to send. /// Any headers to pass along. /// The cancellation token. /// The type of the result. /// The result. Task SendAsync(ICommand command, IDictionary headers, CancellationToken cancellationToken = default); /// /// Sends a command using the specified strategy. /// /// The command to send. /// The command strategy to use. /// The cancellation token. /// The type of the result. /// The result. Task SendAsync(ICommand command, ICommandStrategy strategy, CancellationToken cancellationToken = default); /// /// Sends a command using the specified strategy. /// /// The command to send. /// The command strategy to use. /// Any headers to pass along. /// The cancellation token. /// The type of the result. /// The result. Task SendAsync(ICommand command, ICommandStrategy strategy, IDictionary headers, CancellationToken cancellationToken = default); /// /// Sends a command using the default strategy. /// /// The command to send. /// The cancellation token. Task SendAsync(ICommand command, CancellationToken cancellationToken = default); /// /// Sends a command using the specified strategy. /// /// The command to send. /// The command strategy to use. /// The cancellation token. Task SendAsync(ICommand command, ICommandStrategy strategy, CancellationToken cancellationToken = default); /// /// Sends a command using the specified strategy. /// /// The command to send. /// The command strategy to use. /// Any headers to pass along. /// The cancellation token. Task SendAsync(ICommand command, ICommandStrategy strategy, IDictionary headers, CancellationToken cancellationToken = default); }