public UAReturn Execute(CommandRequest cmd) { UAReturn r; ServerCommand srvCMD = new ServerCommand(_userSession.DefaultDispatcher, "", cmd.CommandSyntax); srvCMD.Execute(); return(srvCMD.Result); }
/// <summary> /// Adds a available server command. /// </summary> public void AddAvailableServerCommand(ServerCommand Command) { if (this.GameMode.IsConnected) { this.AvailableServerCommands.Add(Command.Id = ++this.Seed, Command); this.GameMode.Listener.SendMessage(new AvailableServerCommandMessage(Command)); } else { Command.Execute(this.GameMode); } }
internal void AddCommand(ServerCommand Command) { if (Command.IsServerCommand) { if (this.Level.GameMode.Connected) { this.ServerCommands.Add(Command.Id = Interlocked.Increment(ref this.NextServerCommandId), Command); new AvailableServerCommandMessage(this.Level.GameMode.Device) { Command = Command }.Send(); } else { Command.Execute(); } } else { Logging.Info(this.GetType(), "AddCommand() - Command is not a server command."); } }
private static void ProcessSocketCommand(string command) { var cmdObj = new ServerCommand(command); cmdObj.Execute(_channels); }