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); }
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(); }
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(); }