Reduce allocations when using DataContractSerializer with SurrogateTypes (#70620)
authorDaniel Svensson <daniel.svensson@hotmail.se>
Fri, 8 Jul 2022 15:33:19 +0000 (17:33 +0200)
committerGitHub <noreply@github.com>
Fri, 8 Jul 2022 15:33:19 +0000 (11:33 -0400)
commit53eb45d9de24402b790b2a8f8b57c8597e6afad4
tree369611caad52e928fd9fa2960ac9d47bf82bc31a
parente4284b8cd4e3b4fb44613c5c88f3a9fabb5050f4
Reduce allocations when using DataContractSerializer with SurrogateTypes (#70620)

* Dont create HashSet unless needed in IsTypeSerializable

* Apply suggestions from code review
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs