Share via


JsonSerializerOptions.TypeInfoResolverChain 屬性

定義

取得這個實例所使用的鏈結 JsonTypeInfo 合約解析程式清單。

public:
 property System::Collections::Generic::IList<System::Text::Json::Serialization::Metadata::IJsonTypeInfoResolver ^> ^ TypeInfoResolverChain { System::Collections::Generic::IList<System::Text::Json::Serialization::Metadata::IJsonTypeInfoResolver ^> ^ get(); };
public System.Collections.Generic.IList<System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver> TypeInfoResolverChain { get; }
member this.TypeInfoResolverChain : System.Collections.Generic.IList<System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver>
Public ReadOnly Property TypeInfoResolverChain As IList(Of IJsonTypeInfoResolver)

屬性值

備註

鏈結的順序很重要: JsonSerializerOptions 會依指定的順序查詢每個解析程式,並傳回非 Null 的第一個結果。 如果鏈結中的所有解析程式都會傳回 null ,則 JsonSerializerOptions 也會傳回 null

這個屬性是輔助屬性,而且會與 TypeInfoResolver 屬性保持同步。 對此屬性所做的任何變更會由 TypeInfoResolver 反映,反之亦然。

適用於