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