Beispiel #1
0
        public static void ParseCommandLineArgsAndExecute(string[] args)
        {
            string enteredCommand = args[0];
            bool   validCommand   = false;

            foreach (CommandActionWithStringAndAction command in commands)
            {
                if (enteredCommand.Equals(command.commandLineArgument, StringComparison.InvariantCultureIgnoreCase))
                {
                    validCommand = true;
                    command.action(args);
                    break;
                }
            }

            if (!validCommand)
            {
                NonInteractiveConsoleCommands.DisplayHelp(args);
            }
        }
 static public void DisplayHelp()
 {
     NonInteractiveConsoleCommands.DisplayHelp(null);
 }