英語で読む 編集

次の方法で共有


JsonPropertyInfo.AttributeProvider Property

Definition

Gets or sets the custom attribute provider for the current property.

C#
public System.Reflection.ICustomAttributeProvider? AttributeProvider { get; set; }

Property Value

Exceptions

The JsonPropertyInfo instance has been locked for further modification.

Remarks

When resolving metadata via DefaultJsonTypeInfoResolver or JsonSerializerContext, this property will be populated with the underlying MemberInfo of the serialized property or field.

Setting a custom attribute provider has no impact on the contract model but serves as metadata for downstream contract modifiers.

Applies to

製品 バージョン
.NET 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)