2 writes to DeclaringTypeInfo
System.Text.Json (2)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (2)
375DeclaringTypeInfo = declaringTypeInfo; // null declaringTypeInfo means it's not tied yet 940DeclaringTypeInfo = parent;
20 references to DeclaringTypeInfo
System.Text.Json (20)
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (2)
98Debug.Assert(MatchingProperty.DeclaringTypeInfo is not 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)
406DeclaringTypeInfo?.VerifyMutable(); 413Debug.Assert(DeclaringTypeInfo is not null); 560Debug.Assert(DeclaringTypeInfo is not null, "We should have ensured parent is assigned in JsonTypeInfo"); 561Debug.Assert(!DeclaringTypeInfo.IsConfigured); 563JsonNumberHandling? declaringTypeNumberHandling = DeclaringTypeInfo.NumberHandling; 588Debug.Assert(DeclaringTypeInfo is not null, "We should have ensured parent is assigned in JsonTypeInfo"); 597JsonNumberHandling? handling = NumberHandling ?? DeclaringTypeInfo.NumberHandling ?? _jsonTypeInfo.NumberHandling; 616Debug.Assert(DeclaringTypeInfo is not null, "We should have ensured parent is assigned in JsonTypeInfo"); 625DeclaringTypeInfo.PreferredPropertyObjectCreationHandling 626?? (DeclaringTypeInfo.DetermineUsesParameterizedConstructor() 635!DeclaringTypeInfo.SupportsPolymorphicDeserialization && 674if (DeclaringTypeInfo.DetermineUsesParameterizedConstructor()) 938if (DeclaringTypeInfo is null) 942else if (DeclaringTypeInfo != parent) 947DeclaringTypeInfo.ResolveMatchingParameterInfo(this);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
1552Debug.Assert(property.DeclaringTypeInfo == this);
System\Text\Json\ThrowHelper.Serialization.cs (2)
854Debug.Assert(propertyInfo.DeclaringTypeInfo is not null, "We should not throw this exception when ParentTypeInfo is null"); 855throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.Name, propertyInfo.DeclaringTypeInfo.Type.FullName));