示例#1
0
 public CommandInfo(
     string command, string description, DebugCommandExecute callback)
 {
     this.command     = command;
     this.description = description;
     this.callback    = callback;
 }
示例#2
0
 public CommandInfo(
     string command, string description, DebugCommandExecute callback)
 {
     this.command = command;
     this.description = description;
     this.callback = callback;
 }
示例#3
0
        public void RegisterCommand(string command, string description, DebugCommandExecute callback)
        {
            string lowerCommand = command.ToLower();

            if (commandTable.ContainsKey(lowerCommand))
            {
                throw new InvalidOperationException(String.Format("Command \"{0}\" is already registered.", command));
            }

            commandTable.Add(lowerCommand, new CommandInfo(command, description, callback));
        }
示例#4
0
        public void RegisterCommand(
            string command, string description, DebugCommandExecute callback)
        {
            string lowerCommand = command.ToLower();
            if (commandTable.ContainsKey(lowerCommand))
            {
                throw new InvalidOperationException(
                    String.Format("Command \"{0}\" is already registered.", command));
            }

            commandTable.Add(
                lowerCommand, new CommandInfo(command, description, callback));
        }
 public DebugCommandInfo(string name, string description, DebugCommandExecute callback)
 {
     Name = name;
     Description = description;
     Callback = callback;
 }
        public void RegisterDebugCommand(string name, string description, DebugCommandExecute callback)
        {
            var lowerName = name.ToLower();
            if (debugCommandDictionaty.ContainsKey(lowerName))
            {
                throw new InvalidOperationException(String.Format("Name '{0}' already exists", name));
            }

            debugCommandDictionaty.Add(lowerName, new DebugCommandInfo(name, description, callback));
        }