JsonSerializerContext.IJsonTypeInfoResolver.GetTypeInfo 方法

定義

JsonTypeInfo解析所要求類型和選項的合約。

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

參數

type
Type

要解析的型別。

options
JsonSerializerOptions

解析中繼資料時要使用的組態。

傳回

JsonTypeInfo符合要求型別的實例,如果 null 無法解析合約,則為 。

實作

適用於