Exemplo n.º 1
0
 private static CommandLineBuilder BuildCommandLine()
 {
     return(new CommandLineBuilder()
            .AddGlobalOption(SilentOption)
            .AddGlobalOption(VerboseOption)
            .AddCommand(CircuitApp.BuildCommand())
            .AddCommand(ComponentApp.BuildCommand())
            .AddCommand(ComponentOutlineApp.BuildCommand()));
 }
Exemplo n.º 2
0
 static int Main(string[] args)
 {
     return(CommandLine.Parser.Default.ParseArguments <CircuitApp.Options, ComponentApp.Options, ComponentOutlineApp.Options>(args)
            .MapResult(
                (CircuitApp.Options options) => CircuitApp.Run(options),
                (ComponentApp.Options options) => ComponentApp.Run(options),
                (ComponentOutlineApp.Options options) => ComponentOutlineApp.Run(options),
                err => 1
                ));
 }