Skip to content

Optional argument of MessageTemplateTextFormatter is not syntactically optional #1328

@TysonMN

Description

@TysonMN

Does this issue relate to a new feature or an existing bug?

  • Bug
  • New Feature

What version of Serilog is affected? Please list the related NuGet package.
2.8.0 (currently the latest)

What is the target framework and operating system? See target frameworks & net standard matrix.

All or NA

Please describe the current behavior?
The only constructor of MessageTemplateTextFormatter requires as its second and last argument a reference to an instance of IFormatProvider. However, the documentation says that this reference is allowed to be null. Indeed, MessageTemplateTextFormatter eventually passes this reference into four functions and all them syntactically specify that a reference to an instance of IFormatProvider is optional by providing the default value null.

Please describe the expected behavior?
I was expecting that the constructor of MessageTemplateTextFormatter would also syntactically specify that a reference to an instance of IFormatProvider is optional by providing the default value null.

If it would be helpful, I can create a PR to resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions