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,19 @@
using Elsa.Mediator.Contexts;
using Elsa.Mediator.Contracts;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Mediator.CommandStrategies;
/// <summary>
/// Invokes command handlers in the background and does not wait for the result.
/// </summary>
public class BackgroundStrategy : ICommandStrategy
{
/// <inheritdoc />
public async Task<TResult> ExecuteAsync<TResult>(CommandStrategyContext context)
{
var commandsChannel = context.ServiceProvider.GetRequiredService<ICommandsChannel>();
await commandsChannel.Writer.WriteAsync(context.CommandContext, context.CancellationToken);
return default!;
}
}