Add [DebuggerDisplay] to Json types (dotnet/corefx#38275)
authorJeremy Kuhne <jkuhne@microsoft.com>
Thu, 13 Jun 2019 05:58:08 +0000 (22:58 -0700)
committerAhson Khan <ahkha@microsoft.com>
Thu, 13 Jun 2019 05:58:08 +0000 (22:58 -0700)
commit82f07be915f55a898b42206710f1156356aaddf8
tree882f9ebdc612650c900c224e38acba240b80c431
parent760185cbdac974d51db4e7282533ff2b260a2c25
Add [DebuggerDisplay] to Json types (dotnet/corefx#38275)

* Add [DebuggerDisplay] to Json types

Note that there is an issue with turning the TokenType to string in Utf8JsonReader. Probably reflection related? I've been unable to create a more focused repro.

* Add some simple sanity tests

* Address some feedback.

* Use JsonValueType

Commit migrated from https://github.com/dotnet/corefx/commit/b506d4a4ff6ffe1a1877016811e2266eacc2ebbc
src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.ArrayEnumerator.cs
src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.ObjectEnumerator.cs
src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs
src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonProperty.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs
src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
src/libraries/System.Text.Json/tests/DebuggerTests.cs [new file with mode: 0644]
src/libraries/System.Text.Json/tests/System.Text.Json.Tests.csproj
src/libraries/System.Text.Json/tests/TestClasses.ClassWithComplexObjects.cs