Exemple #1
0
        private static int Help(HelpCommandLineOptions options)
        {
            Filter filter = null;

#if DEBUG
            if (!string.IsNullOrEmpty(options.Filter))
            {
                try
                {
                    filter = new Filter(new Regex(options.Filter, RegexOptions.IgnoreCase));
                }
                catch (ArgumentException ex)
                {
                    WriteLine($"Filter is invalid: {ex.Message}", Verbosity.Quiet);
                    return(ExitCodes.Error);
                }
            }
#endif
            var command = new HelpCommand(options: options, filter);

            CommandStatus status = command.Execute();

            return(GetExitCode(status));
        }
Exemple #2
0
 public HelpCommand(HelpCommandLineOptions options, Filter filter)
 {
     Options = options;
     Filter  = filter;
 }