Add simpler Utf8JsonReader ctors that dont require JsonReaderState or IsFinalBlock...
authorAhson Khan <ahkha@microsoft.com>
Wed, 26 Jun 2019 17:49:53 +0000 (10:49 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Jun 2019 17:49:53 +0000 (10:49 -0700)
commit71ad5b675a703ff7e2d405bf92707bab23d8ecb1
treeb932fcac87f42e50d64168d9f894db865f234b2d
parentaaecfe1271a9eede96863e520ac4dc4abb3c98dd
Add simpler Utf8JsonReader ctors that dont require JsonReaderState or IsFinalBlock. (dotnet/corefx#38868)

* Add simpler Utf8JsonReader ctors that dont require JsonReaderState or
IsFinalBlock.

* Update ctors and add tests for simple ctor.

* Address PR feedback.

* Implement the convenience ctor over the existing one.

* Update new tests to remove the BytesConsumed, Position usage.

Commit migrated from https://github.com/dotnet/corefx/commit/7f8333149a0f24fc3f007eefb976118cf9ab06c5
src/libraries/System.Text.Json/ref/System.Text.Json.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderState.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs
src/libraries/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs
src/libraries/System.Text.Json/tests/Utf8JsonReaderTests.cs