public void SendCommand(string command) { if (command == ".") { command = LastCommand; } else { LastCommand = command; } this.serverConnection.SendText(command); SentCommands.Enqueue(command); if (SentCommands.Count > 30) { SentCommands.Dequeue(); } }
public bool CommandWasSent(Type commandType) { return(SentCommands.Any(x => x.GetType().IsAssignableFrom(commandType))); }