1 write to _discriminatorIdtoType
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
55
if (!(
_discriminatorIdtoType
??= new()).TryAdd(typeDiscriminator, derivedTypeInfoHolder))
4 references to _discriminatorIdtoType
System.Text.Json (4)
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (4)
73
Debug.Assert(
_discriminatorIdtoType
!= null, "Discriminator index must have been populated.");
96
foreach (DerivedJsonTypeInfo derivedTypeInfo in
_discriminatorIdtoType
.Values)
167
Debug.Assert(
_discriminatorIdtoType
!= null);
169
if (
_discriminatorIdtoType
.TryGetValue(typeDiscriminator, out DerivedJsonTypeInfo? result))