Ejemplo n.º 1
0
 public async Task <BatchJobExecutionResult> Execute(BatchJob batchJob)
 {
     return(await BatchJobExecutionResult.TryAsync(() =>
     {
         var job = batchJob as T;
         return job == null
             ? Task.FromResult(BatchJobExecutionResult.Failure("Batch job is not of the correct type"))
             : Execute(job);
     }));
 }