public Command this[string cmdName] { get { if(_commands.ContainsKey(cmdName)) { return _commands[cmdName]; } else { throw new KeyNotFoundException(string.Format( "No command named '{0}' has been registered", cmdName)); } } }