1 write to DeclaringType
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
378DeclaringType = declaringType;
19 references to DeclaringType
Microsoft.AspNetCore.OpenApi (1)
Services\Schemas\OpenApiSchemaService.cs (1)
103if (jsonPropertyInfo.PropertyType == jsonPropertyInfo.DeclaringType)
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonSchemaCreateContext.cs (1)
55_exporterContext.PropertyInfo?.DeclaringType;
System.Text.Json (17)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (1)
155ThrowHelper.ThrowInvalidOperationException_JsonIncludeOnInaccessibleProperty(jsonPropertyInfo.MemberName, jsonPropertyInfo.DeclaringType);
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (1)
30public Type DeclaringType => MatchingProperty.DeclaringType;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (4)
480this is { DeclaringType.IsValueType: false, IsIgnored: false, IsExtensionData: false } && 487ThrowHelper.ThrowInvalidOperationException_PropertyConflictsWithMetadataPropertyName(DeclaringType, Name); 1073=> MemberName == other.MemberName && DeclaringType.IsAssignableFrom(other.DeclaringType);
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (1)
423ThrowHelper.ThrowInvalidOperationException_IgnoreConditionOnValueTypeInvalid(MemberName!, DeclaringType);
System\Text\Json\ThrowHelper.Serialization.cs (10)
88throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPopulateNotSupportedByConverter, propertyInfo.Name, propertyInfo.DeclaringType)); 94throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyMustHaveAGetter, propertyInfo.Name, propertyInfo.DeclaringType)); 100throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyValueTypeMustHaveASetter, propertyInfo.Name, propertyInfo.DeclaringType)); 106throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization, propertyInfo.Name, propertyInfo.DeclaringType)); 112throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowReadOnlyMember, propertyInfo.Name, propertyInfo.DeclaringType)); 275throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameNull, jsonPropertyInfo.DeclaringType, jsonPropertyInfo.MemberName)); 281throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndNotDeserializable, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 287throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndExtensionData, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 369throw new InvalidOperationException(SR.Format(SR.ExtensionDataCannotBindToCtorParam, propertyName, jsonPropertyInfo.DeclaringType)); 388throw new InvalidOperationException(SR.Format(SR.NumberHandlingOnPropertyInvalid, jsonPropertyInfo.MemberName, jsonPropertyInfo.DeclaringType));