Пример #1
0
 public void SendCommand(ConsoleCommand command)
 {
     BroadcastConsoleMessage(
     string.Format("command: {0} {1}",
       command.Name.ToString().ToLower(),
       string.Join(" ", command.Arguments)));
       SendCommandToRover(command);
 }
        public ConsoleConnectionStatus Send(ConsoleCommand command)
        {
            if (Connection.State == ConnectionState.Disconnected)
            return ConsoleConnectionStatus.NoConnection;

              try
              {
            Hub.Invoke(ConsoleConstants.SendCommand, command).Wait();
            return ConsoleConnectionStatus.Ok;
              }
              catch (Exception ex)
              {
            Logger.LogException(ex);
            return ConsoleConnectionStatus.OperationException;
              }
        }
Пример #3
0
 private void ReadCommand()
 {
     string commandRawData = ReadCommandRawData();
       _command = _commands.Parse(commandRawData);
 }
Пример #4
0
 private void SendCommandToRover(ConsoleCommand command)
 {
     if (!string.IsNullOrWhiteSpace(_roverConnectionId))
     Clients.Client(_roverConnectionId).RoverRequest(command);
 }