private static CommandLineBuilder BuildCommandLine() { return(new CommandLineBuilder() .AddGlobalOption(SilentOption) .AddGlobalOption(VerboseOption) .AddCommand(CircuitApp.BuildCommand()) .AddCommand(ComponentApp.BuildCommand()) .AddCommand(ComponentOutlineApp.BuildCommand())); }
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 )); }