Exemplo n.º 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();
                                  });
     }
 }
Exemplo n.º 2
0
 public void SendCommand(BaseCommand command)
 {
     OnCommandReceived(command);
 }
Exemplo n.º 3
0
 public void ProcessCommand(BaseCommand command)
 {
     CommandMessage message = _messenger.CreateMessage<CommandMessage>();
     message.Command = command;
     _messenger.Send(message);
 }