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