예제 #1
0
 public CommandReturnCodes Run()
 {
     try {
         return(DoRun());
     }
     catch (Exception e) {
         _logger.LogError("Error:");
         for (; e != null; e = e.InnerException)
         {
             _logger.LogError("  {0}", e.Message);
         }
         return(CommandReturnCodes.Fail);
     }
 }
예제 #2
0
 public async Task <CommandReturnCodes> RunAsync()
 {
     try
     {
         return(await DoRunAsync());
     }
     catch (Exception e)
     {
         _logger.LogError("Error:");
         for (; e != null; e = e.InnerException)
         {
             _logger.LogError("  {0}", e.Message);
         }
         return(CommandReturnCodes.Fail);
     }
 }