Update behaviors of new TextWriter StringBuilder overloads (dotnet/coreclr#18578)
authorStephen Toub <stoub@microsoft.com>
Fri, 22 Jun 2018 01:36:59 +0000 (21:36 -0400)
committerGitHub <noreply@github.com>
Fri, 22 Jun 2018 01:36:59 +0000 (21:36 -0400)
commit8e2b58e167df7d42c45023c4da7d1eefc1c0ccd2
tree605c745f9d57516de47b62d6edf72b7bd45f0403
parent8f33bd55afdece15d70be9278015f4190395195e
Update behaviors of new TextWriter StringBuilder overloads (dotnet/coreclr#18578)

Two issues addressed:
- CancellationToken was being ignored; the overloads should check whether cancellation was requested.  This applies to the existing Write{Line}Async overloads that were added in 2.1.
- The other overloads support inputs (string, char[], etc.) being null, and just treat that the same as an empty string.  We should do the same for StringBuilder rather than throwing.

Commit migrated from https://github.com/dotnet/coreclr/commit/538a51e593964ad34147e3143153885135412837
src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs