2 writes to DeclaringTypeInfo
System.Text.Json (2)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (2)
380
DeclaringTypeInfo
= declaringTypeInfo; // null declaringTypeInfo means it's not tied yet
928
DeclaringTypeInfo
= parent;
19 references to DeclaringTypeInfo
System.Text.Json (19)
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (2)
98
Debug.Assert(MatchingProperty.
DeclaringTypeInfo
!= null, "Declaring type metadata must have already been configured.");
100
if (parameterInfo is null && MatchingProperty.
DeclaringTypeInfo
.ConstructorAttributeProvider is MethodBase ctorInfo)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (15)
411
DeclaringTypeInfo
?.VerifyMutable();
418
Debug.Assert(
DeclaringTypeInfo
!= null);
565
Debug.Assert(
DeclaringTypeInfo
!= null, "We should have ensured parent is assigned in JsonTypeInfo");
566
Debug.Assert(!
DeclaringTypeInfo
.IsConfigured);
568
JsonNumberHandling? declaringTypeNumberHandling =
DeclaringTypeInfo
.NumberHandling;
593
Debug.Assert(
DeclaringTypeInfo
!= null, "We should have ensured parent is assigned in JsonTypeInfo");
602
JsonNumberHandling? handling = NumberHandling ??
DeclaringTypeInfo
.NumberHandling ?? _jsonTypeInfo.NumberHandling;
621
Debug.Assert(
DeclaringTypeInfo
!= null, "We should have ensured parent is assigned in JsonTypeInfo");
630
DeclaringTypeInfo
.PreferredPropertyObjectCreationHandling
631
?? (
DeclaringTypeInfo
.DetermineUsesParameterizedConstructor()
640
!
DeclaringTypeInfo
.SupportsPolymorphicDeserialization &&
679
if (
DeclaringTypeInfo
.DetermineUsesParameterizedConstructor())
926
if (
DeclaringTypeInfo
is null)
930
else if (
DeclaringTypeInfo
!= parent)
935
DeclaringTypeInfo
.ResolveMatchingParameterInfo(this);
System\Text\Json\ThrowHelper.Serialization.cs (2)
790
Debug.Assert(propertyInfo.
DeclaringTypeInfo
!= null, "We should not throw this exception when ParentTypeInfo is null");
791
throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.Name, propertyInfo.
DeclaringTypeInfo
.Type.FullName));