Create a gist now

Instantly share code, notes, and snippets.

using System;
using MediatR;
namespace Hangfire.MediatR
{
public class MediatRJobActivator : JobActivator
{
private readonly IMediator _mediator;
public MediatRJobActivator(IMediator mediator)
{
_mediator = mediator;
}
public override object ActivateJob(Type type)
{
return new HangfireMediator(_mediator);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment