Skip to content

1.2.0-beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@odinserj odinserj released this 24 Jul 09:44

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 and InRequestOrBackgroundJobScope 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.