public void Execute(string message = null) { string spacer = message == null ? "" : "\n\n"; string help = Cli.GetHelp(Helpable); string fullHelp = $"{message}{spacer}{help}"; Helpable.HelpInvoked = true; Helpable.OnHelpInvoked(fullHelp); }
private static SubscribeArguments ParseCommandLineArgs(string[] args) { if (args.Length == 0) { var helpText = Cli.GetHelp <SubscribeArguments>(); Console.WriteLine(helpText); Environment.Exit(0); } // Parse the command line arguments var arguments = Cli.Parse <SubscribeArguments>(args); return(arguments); }