Example #1
0
            public override CommandResultCode Execute(IExecutionContext context, CommandArguments args)
            {
                if (args.MoveNext())
                {
                    ((TestApplication)Application).appDir = args.Current;
                }

                TestApplication app = (TestApplication)Application;

                app.Configure();
                return(CommandResultCode.Success);
            }
Example #2
0
        static void Main(string[] args)
        {
            TestApplication application = new TestApplication();
            application.Commands.Register(new CompletionExampleCommand());
            application.Commands.Register(typeof(PlainAskCommand));
            application.Commands.Register(typeof(VerticalAskCommand));
            application.Commands.Register(typeof (LongDescriptiveCommand));

            application.HandleCommandLine(args);
            application.SetPrompt("testapp> ");
            application.Run();
        }
Example #3
0
        static void Main(string[] args)
        {
            TestApplication application = new TestApplication();

            application.Commands.Register(new CompletionExampleCommand());
            application.Commands.Register(typeof(PlainAskCommand));
            application.Commands.Register(typeof(VerticalAskCommand));
            application.Commands.Register(typeof(LongDescriptiveCommand));

            application.HandleCommandLine(args);
            application.SetPrompt("testapp> ");
            application.Run();
        }