public Handlers.Jobs.IJobRunner GetRunnerFor(Model.Job job) { var jt = job.GetType(); var generic = typeof(IJobRunner <>); var runner = generic.MakeGenericType(jt); return(( IJobRunner )this.container.GetService(runner)); }
public IJobWorker GetWorkerFor(Model.Job job) { var jt = job.GetType(); var generic = typeof(IJobWorker <>); var worker = generic.MakeGenericType(jt); return(( IJobWorker )this.container.GetService(worker)); }