Cache polymorphic properties (dotnet/corefx#41753)
authorPetr Onderka <gsvick@gmail.com>
Mon, 21 Oct 2019 20:37:17 +0000 (22:37 +0200)
committerAhson Khan <ahson_ahmedk@yahoo.com>
Mon, 21 Oct 2019 20:37:17 +0000 (13:37 -0700)
commitca9dae0c160cb9b620c7b9afa06d34cc566c6c69
tree5a697481b94bff6e892f9b31ba9c97a1187a08c5
parent63860042a64be88f531162a1c32009fe59a76a89
Cache polymorphic properties (dotnet/corefx#41753)

* Cache polymorphic properties

* Move RuntimePropertyCache to JsonClassInfo

* Added test of RuntimePropertyCache using properties with different attributes

* Fixed typo

Co-Authored-By: Ahson Khan <ahkha@microsoft.com>
* Use allocating overload of GetOrAdd on .Net Standard 2.0

Commit migrated from https://github.com/dotnet/corefx/commit/46299619e290936c495264162ede68354ced5b18
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs
src/libraries/System.Text.Json/tests/Serialization/Object.WriteTests.cs