语言

DefaultJsonTypeInfoResolver.GetTypeInfo(Type, JsonSerializerOptions) 方法

定义

解析给定 type 和 options 配置的 JSON 协定。

public:
 virtual System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ GetTypeInfo(Type ^ type, System::Text::Json::JsonSerializerOptions ^ options);
public virtual System.Text.Json.Serialization.Metadata.JsonTypeInfo GetTypeInfo(Type type, System.Text.Json.JsonSerializerOptions options);
abstract member GetTypeInfo : Type * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Serialization.Metadata.JsonTypeInfo
override this.GetTypeInfo : Type * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Serialization.Metadata.JsonTypeInfo
Public Overridable Function GetTypeInfo (type As Type, options As JsonSerializerOptions) As JsonTypeInfo

参数

type
Type

要为其解析 JSON 协定的类型。

options
JsonSerializerOptions

JsonSerializerOptions用于确定协定配置的实例。

返回

定义JsonTypeInfo反射派生的 JSON 协定。type

实现

例外

type 或 options 为 null.

注解

此方法的基本实现将生成反射派生的协定,并从列表中应用任何回调 Modifiers 。

适用于