Пример #1
0
        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);
        }
Пример #2
0
        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);
        }