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