コード例 #1
0
        static void Main(string[] args)
        {
            Shell = new Core.ShellShell();
            var cmd = new ShellCommand(CommandNames.Command2, Command1);

            cmd.ConfigureSwitch(SwitchesNames.Switch1);
            cmd.ConfigureParameter(ParameterNames.Parameter1, false);
            cmd.ConfigureParameter(ParameterNames.Parameter2, false, "default1");
            Shell.ConfigureCommand(cmd);

            var cmd2 = new ShellCommand(CommandNames.Command1, Command1);

            cmd2.ConfigureSwitch(SwitchesNames.Switch2);
            cmd2.ConfigureParameter(ParameterNames.Parameter1, true);
            Shell.ConfigureCommand(cmd2);

            Shell.ConfigureGlobalParameter(ParameterNames.Parameter3, true);

            //shell.UseDefaultCommand = true;
            try
            {
                Shell.SetArguments(args);
                Shell.Execute();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
            Console.ReadLine();
        }