When we did the DI work, we didn't reconcile the existing IJobActivator interface with DI. There are patterns that can be used to bridge the gap (e.g. see https://github.com/Azure/azure-webjobs-sdk/issues/1915) however, registration of a custom IJobActivator instance shouldn't be needed. Instead our activation channel should be able to just use the IServiceProvider to dynamically get instances as needed.
Is this (first class DI for functions themselves) this expected for part of initial v2 GA release?
No unfortunately, it missed the cutoff. But we'll get it in soon.
@mathewc does the change mean having a static class to host functions is no longer the way to go?
Do we now need to pay attention to Functions object lifetime?
This issue shows closed, but I'm not quite seeing if DI is still natively supported? Is there an example of how to do dependency injection that works? I can't seem to get it going.
Also can't get it to work. Trying the sample but the constructor for Functions is not being called (which in turn makes all services null when trying to call them from triggered method).
@mathewc - Any comments on this?
Most helpful comment
This issue shows closed, but I'm not quite seeing if DI is still natively supported? Is there an example of how to do dependency injection that works? I can't seem to get it going.