Exemple #1
0
 public async Task ExecuteAsync(QueryResult result)
 {
     using (_logger.Timed("Execute {@queryResult}", result))
     {
         try
         {
             var caller = Clients.Client(Context.ConnectionId);
             await _executionService.ExecuteAsync(caller, result);
         }
         catch (Exception e)
         {
             _logger.Information(e, "An unhandled exception occured.");
         }
     }
 }
        public async Task <ActionResult <IEnumerable <string> > > TestAsyncWithoutContext()
        {
            var result = await executionService.ExecuteAsync(ProcessExamplesEnum.Process1, () => TestMethod());

            return(Ok(result));
        }
Exemple #3
0
 /// <summary>
 /// Executes the Task service asynchronous.
 /// </summary>
 /// <returns></returns>
 /// <exception cref="NotImplementedException"></exception>
 public virtual Task <ExecutionResult> TaskServiceAsync()
 {
     return(_taskExecution == null?Task.FromResult(new ExecutionResult(StepExecutionStatusEnum.Failed, null,
                                                                       "No Task Service registered.")) :
                _taskExecution.ExecuteAsync(this));
 }