I've got an asp.net 5 web app using standard .net Dependency Injection. As I understand it, out of the box Hangfire will use the same dependencies for instantiating jobs as MVC will for controllers etc. I'd like to inject a different dependency when instantiating jobs. How can I do this?
e.g. some classes have dependencies on IHttpContextAccessor so I want to provide an alternative for use within hangfire jobs that will get its state from serialized job parameters instead.
I see some discussion here of complex things that sounds like what I need ... but I'd love a simple example :-)