JsonMetadataServices.CreatePropertyInfo<T> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为属性或字段创建元数据。
public:
generic <typename T>
static System::Text::Json::Serialization::Metadata::JsonPropertyInfo ^ CreatePropertyInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonPropertyInfoValues<T> ^ propertyInfo);
public static System.Text.Json.Serialization.Metadata.JsonPropertyInfo CreatePropertyInfo<T>(System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<T> propertyInfo);
static member CreatePropertyInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<'T> -> System.Text.Json.Serialization.Metadata.JsonPropertyInfo
Public Shared Function CreatePropertyInfo(Of T) (options As JsonSerializerOptions, propertyInfo As JsonPropertyInfoValues(Of T)) As JsonPropertyInfo
类型参数
- T
转换 JSON 数据时,属性转换器返回或接受的类型。
参数
- options
- JsonSerializerOptions
JsonSerializerOptions用于序列化和反序列化。
- propertyInfo
- JsonPropertyInfoValues<T>
提供有关属性或字段的序列化元数据。
返回
JsonPropertyInfo使用提供的元数据初始化的实例。
注解
此 API 供 System.Text.Json 源生成器的输出使用,不应直接调用。