Hangfire job activator based on Spring.Net IoC container
Hangfire.SpringNet resolves service instances.
Hangfire.SpringNet is available as a NuGet Package. Type the following command into NuGet Package Manager Console window to install it:
The package provides an extension methods for the
IGlobalConfiguration interface, so you can enable Spring.Net integration using the
Spring.Context.IApplicationContext context = Spring.Context.Support.ContextRegistry.GetContext(); GlobalConfiguration.Configuration.UseSpringActivator(context);
After invoking the
UseSpringActivator method, Spring.Net-based implementation of the
JobActivator class will be used to resolve job type instances during the background job processing.
If the type is not defined as singleton in Spring.Net, the activator class will try to dispose the class if it implements
Also be aware that many web related properties that you may be using such as
HttpContext.Current will not be available.