I know that Hangfire.JobActivator allow dynamic object creation. It accepts Type as parameter.
However, I would like to implement class factory that use classKey string as parameter and retrieve its fully qualified assembly and type name from xml file.
All of the job object must implement IMyJob interface, and BackgroundJob.Enqueue( x=> x.Execute(parameter); )
Implemented actual job classes are not added into project reference. Instead via “dynamic dll”.
How to implement this ?
If Hangfire doesn’t support this natively, I was thinking to have my own classFactory, create the object and get the GetType() to pass to BackgroundJob.Enqueue(). The job dll will be located in same folder with Hangfire. Does this design compatible?
If answer to question2 is yes, do you think it is working fine for RecurringJob as well?