Skip to content

IOException when ParserSettings loaded in WPF App #409

Closed
@LordPinhead

Description

@LordPinhead

When i use the Library in my WPF App (not Console App), there will be thrown an IOException in the Constructor of ParserSettings. It will be catched and DefaultMaximumHeight will be set.
But it would, in my opinion, cleaner with that code:


            try
            {
                if (Console.IsOutputRedirected || Console.WindowWidth < 1)
                {
                    maximumDisplayWidth = DefaultMaximumLength;
                }
                else
                {
                    maximumDisplayWidth = Console.WindowWidth;
                }
            }
            catch (IOException)
            {
                maximumDisplayWidth = DefaultMaximumLength;
            }

If you agree, i could do a pull request and merge it.

Best regards
Lord_Pinhead

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions