Exemple #1
0
        /// <summary>
        /// Process the command by the base command type. Calls the methods
        /// that are capable to responding to a particular base command.
        /// </summary>
        /// <param name="command">The command to process.</param>
        private static void ProcessCommand(Command command)
        {
            switch (command.BaseType)
            {
            case CommandType.Load:
                loadTool.RunCommand(command.RawCommands);
                break;

            case CommandType.Run:
                RunHandler(command.RawCommands);
                break;

            case CommandType.Save:
                saveTool.RunCommand(command.RawCommands);
                break;

            case CommandType.Status:
                StatusHandler(command.RawCommands);
                break;

            case CommandType.Update:
                updateTool.RunCommand(command.RawCommands);
                break;

            case CommandType.Help:
                HelpHandler(command.RawCommands);
                break;

            case CommandType.Command:
                CommandScriptHandler(command.RawCommands);
                break;

            case CommandType.App:
                AppLauncherHandler(command.RawCommands);
                break;

            case CommandType.Bad:
            default:
                DefaultHandler();
                break;
            }
        }