public async void Execute(object parameter)
 {
     try
     {
         await commandReceiver.RunCommand(command, default).ConfigureAwait(false);
     }
     catch (Exception e)
     {
         lock (MainWindowViewModel.Singleton)
             MainWindowViewModel.Singleton.AddToConsole($"UNCAUGHT COMMAND EXCEPTION! Type: {typeof(TCommand).Name} Action: {command} Exception: {e}");
     }
 }
Esempio n. 2
0
 public async void Execute(object parameter)
 {
     try
     {
         await commandReceiver.RunCommand(command, default).ConfigureAwait(false);
     }
     catch (Exception e)
     {
         lock (MainWindowViewModel.Singleton)
             MainWindowViewModel.Singleton.ConsoleContent = String.Format(CultureInfo.InvariantCulture, "{0}{1}[{2}]: UNCAUGHT COMMAND EXCEPTION! Type: {3} Action: {4} Exception: {5}", MainWindowViewModel.Singleton.ConsoleContent, Environment.NewLine, DateTimeOffset.Now.ToString("HH:mm:ss", CultureInfo.InvariantCulture), typeof(TCommand).Name, command, e);
     }
 }