IJsonTypeInfoResolver.GetTypeInfo(Type, JsonSerializerOptions) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
解決 JsonTypeInfo 所請求類型與選項的合約。
public:
System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ GetTypeInfo(Type ^ type, System::Text::Json::JsonSerializerOptions ^ options);
public 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
Public Function GetTypeInfo (type As Type, options As JsonSerializerOptions) As JsonTypeInfo
參數
- type
- Type
類型待解決。
- options
- JsonSerializerOptions
解析元資料時所使用的設定。
傳回
若實 JsonTypeInfo 例符合請求型態,或 null 若無法解決合約。