public JobExecutionResult WorkOn( Job job ) { Ensure.That( job ).Named( () => job ).IsNotNull(); Ensure.That( job.Tasks ).IsNotNull(); var worker = this.jobProvider.GetWorkerFor( job ); var result = worker.WorkOn( job ); return result; }
public void Run( Job job ) { Ensure.That( job ).Named( () => job ).IsNotNull(); Ensure.That( job.Tasks ).IsNotNull(); var runner = this.jobProvider.GetRunnerFor( job ); runner.Run( job ); }