Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System.ComponentModel;
using System.Threading.Tasks;
using MediatR;
namespace Hangfire.MediatR
{
public class MediatorHangfireBridge
{
private readonly IMediator _mediator;
public MediatorHangfireBridge(IMediator mediator)
{
_mediator = mediator;
}
public async Task Send(IRequest command)
{
await _mediator.Send(command);
}
[DisplayName("{0}")]
public async Task Send(string jobName, IRequest command)
{
await _mediator.Send(command);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.