Exemple #1
0
 public virtual void SendCommand(BaseCommand command, bool abort = false)
 {
     if (_client != null)
     {
         Task.Run(() =>
                  {
                      try
                      {
                          _client.SendCommand(command);
                      }
                      catch (Exception ex)
                      {
                          NLog.LogManager.GetCurrentClassLogger().Error(ex);
                      }
                  }).ContinueWith(x =>
                                  {
                                      if (abort)
                                          Abort();
                                  });
     }
 }
Exemple #2
0
 public void SendCommand(BaseCommand command)
 {
     OnCommandReceived(command);
 }
 public void ProcessCommand(BaseCommand command)
 {
     CommandMessage message = _messenger.CreateMessage<CommandMessage>();
     message.Command = command;
     _messenger.Send(message);
 }