Exemple #1
0
        public static Task <int> Main(string[] args)
        {
            var command = new RootCommand()
            {
                Description = "Developer tool to update the Visual Studio project versions."
            };

            command.AddCommand(ListCommand.Create());
            command.AddCommand(MajorCommand.Create());
            command.AddCommand(MinorCommand.Create());
            command.AddCommand(PatchCommand.Create());
            command.AddCommand(BuildCommand.Create());
            command.AddCommand(PreCommand.Create());
            command.AddCommand(SetCommand.Create());


            var builder = new CommandLineBuilder(command)
                          .UseHelp()
                          .UseDefaults()
                          .UseVersionOption()
                          .CancelOnProcessTermination()
                          .UseExceptionHandler();

            var parser = builder.Build();

            return(parser.InvokeAsync(args));
        }