示例#1
0
        private CommandResultType ProcessArguments(string[] arguments)
        {
            ConsoleParameter parameter = ParseParameter(arguments);

            if (!_commands.ContainsKey(parameter.Key))
            {
                Logger.Error(
                    $"Command: '{parameter.Key}' not available. Type `help' for a list of available commands.");
                return(CommandResultType.Continue);
            }

            IConsoleCommand consoleCommand = _commands[parameter.Key];

            if (consoleCommand != _switchCommand)
            {
                _switchCommand.Handle(parameter);
            }

            return(consoleCommand.Handle(parameter));
        }