private Console() { ConsoleInputHistory = new ConsoleInputHistory(InputHistoryCapacity); CommandQueue = new Queue <QueuedCommand>(); Commands = new CommandTree(); RegisterAttributes(); }
private void Add(string[] commands, int index, CommandAttribute cmd) { if (commands.Length == index) { Command = cmd; return; } string token = commands[index]; if (!SubCommands.ContainsKey(token)) { SubCommands[token] = new CommandTree(); } SubCommands[token].Add(commands, index + 1, cmd); }