Esempio n. 1
0
        private static ParserResult <T> DisplayHelp <T>(ParserResult <T> parserResult, TextWriter helpWriter)
        {
            parserResult.WithNotParsed(
                errors =>
                Maybe.Merge(errors.ToMaybe(), helpWriter.ToMaybe())
                .Do((_, writer) => writer.Write(HelpText.AutoBuild(parserResult)))
                );

            return(parserResult);
        }
Esempio n. 2
0
        private /*static*/ ParserResult <T> DisplayHelp <T>(ParserResult <T> parserResult, TextWriter helpWriter, int maxDisplayWidth)
        {
            parserResult.WithNotParsed(
                errors =>
                Maybe.Merge(errors.ToMaybe(), helpWriter.ToMaybe())
                .Do((_, writer) => writer.Write(HelpText.AutoBuild(parserResult, settings, maxDisplayWidth)))
                );

            return(parserResult);
        }
Esempio n. 3
0
        private static ParserResult <T> DisplayHelp <T>(ParserResult <T> parserResult, TextWriter helpWriter, int maxDisplayWidth)
        {
            parserResult.WithNotParsed(
                errors =>
                Maybe.Merge(errors.ToMaybe(), helpWriter.ToMaybe())
                .Do((_, writer) =>
            {
                var info = HelpText.AutoBuild(parserResult, maxDisplayWidth);
                writer.Write(info);
            })
                );

            return(parserResult);
        }