1.2.0-beta1
Pre-release
Pre-release
Hangfire.Ninject is updated to support the new JobActivatorScope
class introduced in Hangfire 1.5.0-beta1. It is much simpler now to use the Ninject IoC container with Hangfire now.
Release Notes
- Added
InBackgroundJobScope
andInRequestOrBackgroundJobScope
methods to re-use instances that are already created in current background job processing scope. - Ninject's Cache-and-collect lifecycle management is used to work with
IDisposable
instances.
Updating
Due to the implications of the cache-and-collect system (please see the link above), IDisposable
instances are disposed in a deterministic manner only when a binding reduced to a corresponding scope. Instances of dependencies that are not scoped will be disposed on next GC run (Ninject uses weak references). So please update all your bindings using the InBackgroundJobScope
or InRequestOrBackgroundJobScope
methods.