Add project files.

This commit is contained in:
2025-08-18 17:11:43 +03:30
parent 807dc263be
commit e5eb10d604
3943 changed files with 223719 additions and 0 deletions
@@ -0,0 +1,67 @@
namespace Elsa.Mediator.Contracts;
/// <summary>
/// Sends a command.
/// </summary>
public interface ICommandSender
{
/// <summary>
/// Sends a command using the default strategy.
/// </summary>
Task<T> SendAsync<T>(ICommand<T> command, CancellationToken cancellationToken = default);
/// <summary>
/// Sends a command using the default strategy.
/// </summary>
/// <param name="command">The command to send.</param>
/// <param name="headers">Any headers to pass along.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <typeparam name="T">The type of the result.</typeparam>
/// <returns>The result.</returns>
Task<T> SendAsync<T>(ICommand<T> command, IDictionary<object, object> headers, CancellationToken cancellationToken = default);
/// <summary>
/// Sends a command using the specified strategy.
/// </summary>
/// <param name="command">The command to send.</param>
/// <param name="strategy">The command strategy to use.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <typeparam name="T">The type of the result.</typeparam>
/// <returns>The result.</returns>
Task<T> SendAsync<T>(ICommand<T> command, ICommandStrategy strategy, CancellationToken cancellationToken = default);
/// <summary>
/// Sends a command using the specified strategy.
/// </summary>
/// <param name="command">The command to send.</param>
/// <param name="strategy">The command strategy to use.</param>
/// <param name="headers">Any headers to pass along.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <typeparam name="T">The type of the result.</typeparam>
/// <returns>The result.</returns>
Task<T> SendAsync<T>(ICommand<T> command, ICommandStrategy strategy, IDictionary<object, object> headers, CancellationToken cancellationToken = default);
/// <summary>
/// Sends a command using the default strategy.
/// </summary>
/// <param name="command">The command to send.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task SendAsync(ICommand command, CancellationToken cancellationToken = default);
/// <summary>
/// Sends a command using the specified strategy.
/// </summary>
/// <param name="command">The command to send.</param>
/// <param name="strategy">The command strategy to use.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task SendAsync(ICommand command, ICommandStrategy strategy, CancellationToken cancellationToken = default);
/// <summary>
/// Sends a command using the specified strategy.
/// </summary>
/// <param name="command">The command to send.</param>
/// <param name="strategy">The command strategy to use.</param>
/// <param name="headers">Any headers to pass along.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task SendAsync(ICommand command, ICommandStrategy strategy, IDictionary<object, object> headers, CancellationToken cancellationToken = default);
}