Ejemplo n.º 1
0
 private void DoExecute(CancellationToken token)
 {
     try
     {
         _operation.Execute(token);
     }
     catch (Exception ex)
     {
         OnExecutionError?.Invoke(ex);
     }
 }
 protected void ExecuteCore()
 {
     OnExecuting?.Invoke();
     try
     {
         HandleExecuteCore();
     }
     catch (Exception ex)
     {
         OnExecutionError?.Invoke(ex);
         throw;
     }
     finally
     {
         OnExecuted?.Invoke();
     }
 }