HangFire background job activator based on TinyIoC Container. It allows you to use instance methods of classes that define parameterized constructors
HangFire.TinyIoC is available as a NuGet Package. Type the following command into the Nuget package Manager Console window to install it:
Install-Package Hangfire.TinyIoC
This package provides an extension method for OWIN bootstrapper:
app.UseHangfire(config =>
{
var container = new TinyIoCContainer();
config.UseTinyIoCActivator(container);
});
In order to use the library outside of web application, set the static JobActivator.Current property:
var container = new TinyIoCContainer();
JobActivator.Current = new TinyIoCJobActivator(container);