Ejemplo n.º 1
0
        private void HandleParseError(ParserResult <RunnerOptions> parser, IEnumerable <Error> errors)
        {
            if (errors.IsVersion())
            {
                _outputWriter.PrintArgumentMessage(HeadingInfo.Default);
            }
            else
            {
                var helpText = HelpText.AutoBuild(parser, opts =>
                {
                    opts.AdditionalNewLineAfterOption = false;
                    opts.Heading = $"usage: {Assembly.GetEntryAssembly().GetName().Name} [options] <solutions>...";
                    return(HelpText.DefaultParsingErrorsHandler(parser, opts));
                }, ex => ex);

                _outputWriter.PrintArgumentMessage(helpText);
            }
        }