Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Support dependency injection in scheduled jobs

Vote:
 

Currently, if you wish to have dependencies inside of a scheduled job, you need to use the service locator as the instance is created via Activator.CreateInstance.

Please can we have constructor injection to aid in testability and to keep in line with the rest of the product.

#171922
Nov 21, 2016 16:34
Vote:
 

Thanks for you request Stuart. This is something that's been on our radar for a while and you will be pleased to learn that work on this feature is already underway. So as long as nothing unforseen happens it should be included in an upcoming minor release.

#171968
Nov 22, 2016 15:44
Vote:
 

Thanks for your response, great news to hear :) 

#171972
Nov 22, 2016 15:58
This thread is locked and should be used for reference only.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.