Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created June 10, 2016 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/bb1cdf6af8032089aca6bd240c0ca5a7 to your computer and use it in GitHub Desktop.
Save dcomartin/bb1cdf6af8032089aca6bd240c0ca5a7 to your computer and use it in GitHub Desktop.
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