Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override all write/flush methods on NullTextWriter #83293

Merged
merged 2 commits into from Mar 13, 2023

Conversation

stephentoub
Copy link
Member

The base implementations do non-trivial work, like calling ToString on the arguments, calling string.Format, queueing tasks, etc. None of that should be done if TextWriter.Null is used.

The base implementations do non-trivial work, like calling ToString on the arguments, calling string.Format, queueing tasks, etc.  None of that should be done if TextWriter.Null is used.
@ghost
Copy link

ghost commented Mar 11, 2023

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

The base implementations do non-trivial work, like calling ToString on the arguments, calling string.Format, queueing tasks, etc. None of that should be done if TextWriter.Null is used.

Author: stephentoub
Assignees: -
Labels:

area-System.IO

Milestone: -

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @stephentoub !

@adamsitnik adamsitnik merged commit 7e3bf87 into dotnet:main Mar 13, 2023
@dotnet dotnet locked as resolved and limited conversation to collaborators Apr 12, 2023
@stephentoub stephentoub deleted the nulltextwriter branch June 29, 2023 14:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants