Override all write/flush methods on NullTextWriter (#83293)
authorStephen Toub <stoub@microsoft.com>
Mon, 13 Mar 2023 12:04:12 +0000 (08:04 -0400)
committerGitHub <noreply@github.com>
Mon, 13 Mar 2023 12:04:12 +0000 (13:04 +0100)
commit7e3bf878c105ea6114e56d3e6e3014c5480cb060
tree1badc09c0f9b003a9e15ee7ffe9b6d3bbe43d421
parent46f9533d9b0663aa652b6dc7001417d4924343d2
Override all write/flush methods on NullTextWriter (#83293)

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.
src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs