I have a class in the current assembly called "MyJob"
I want this functionality at runtime:
JobManager.AddJob<MyJob>(s => s.ToRunNow()) //I don't know about "MyJob" at designtime, so I can't do this
If I do this:
var thisAssembly = Assembly.GetExecutingAssembly();
var myJobType = thisAssembly.GetType("MyJob");
JobManager.AddJob<myJobType>(s => s.ToRunNow())
I get this error (at designtime): 'myJobType' is a variable but is used like a type
Btw, this is FluentScheduler but I'm hoping for a generic answer...