示例#1
0
        public static void Configure(CommandLineApplication command)
        {
            command.Description = "Publish documentation";
            command.HelpOption("-?|-h|--help");

            var configOp = command.Option("--config:<filename> | -c:<filename>", "Config file name", optionType: CommandOptionType.SingleOrNoValue);
            var outputOp = command.Option("--output:<folder> | -o: <folder>", "Output path", optionType: CommandOptionType.SingleOrNoValue);

            Func <int> runCommandFunc = new PublsihDocCommand(configOp, outputOp).Run;

            command.OnExecute(runCommandFunc);
        }
示例#2
0
        public static void Configure(CommandLineApplication app)
        {
            app.Name = "aistdoc";
            app.HelpOption("-?|-h|--help");

            // Register commands
            app.Command("publish", c => PublsihDocCommand.Configure(c));
            app.Command("create", c => CreateConfigCommand.Configure(c));
            app.Command("changelog", c => ChangelogCommand.Configure(c));

            Func <int> runCommandFunc = new RootCommand(app).Run;

            app.OnExecute(runCommandFunc);
        }