コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }