語言

JsonMetadataServices.CreateIDictionaryInfo 方法

定義

多載

CreateIDictionaryInfo<TCollection,TKey,TValue>(JsonSerializerOptions, JsonCollectionInfoValues<TCollection>)

來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs

建立可指派到 IDictionary<TKey,TValue>的類型元資料。

public:
generic <typename TCollection, typename TKey, typename TValue>
 where TCollection : System::Collections::Generic::IDictionary<TKey, TValue> static System::Text::Json::Serialization::Metadata::JsonTypeInfo<TCollection> ^ CreateIDictionaryInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues<TCollection> ^ collectionInfo);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<TCollection> CreateIDictionaryInfo<TCollection,TKey,TValue>(System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<TCollection> collectionInfo) where TCollection : System.Collections.Generic.IDictionary<TKey,TValue>;
static member CreateIDictionaryInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<'Collection (requires 'Collection :> System.Collections.Generic.IDictionary<'Key, 'Value>)> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Collection (requires 'Collection :> System.Collections.Generic.IDictionary<'Key, 'Value>)> (requires 'Collection :> System.Collections.Generic.IDictionary<'Key, 'Value>)
Public Shared Function CreateIDictionaryInfo(Of TCollection As IDictionary(Of TKey, TValue), TKey As IDictionary(Of TKey, TValue), TValue As IDictionary(Of TKey, TValue)) (options As JsonSerializerOptions, collectionInfo As JsonCollectionInfoValues(Of TCollection)) As JsonTypeInfo(Of TCollection)

類型參數

TCollection

這是該類型的通用定義。

TKey

金鑰類型的通用定義。

TValue

價值類型的通用定義。

參數

options
JsonSerializerOptions

用於 JsonSerializerOptions 序列化與反序列化。

collectionInfo
JsonCollectionInfoValues<TCollection>

提供關於集合類型的序列化元資料。

傳回

JsonTypeInfo<TCollection>

針對特定類型的序列化元資料。

備註

此 API 供 System.Text.Json 原始碼產生器的輸出使用,不應直接呼叫。

適用於

CreateIDictionaryInfo<TCollection>(JsonSerializerOptions, JsonCollectionInfoValues<TCollection>)

來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs
來源:
JsonMetadataServices.Collections.cs

建立可指派到 IDictionary的類型元資料。

public:
generic <typename TCollection>
 where TCollection : System::Collections::IDictionary static System::Text::Json::Serialization::Metadata::JsonTypeInfo<TCollection> ^ CreateIDictionaryInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues<TCollection> ^ collectionInfo);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<TCollection> CreateIDictionaryInfo<TCollection>(System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<TCollection> collectionInfo) where TCollection : System.Collections.IDictionary;
static member CreateIDictionaryInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<'Collection (requires 'Collection :> System.Collections.IDictionary)> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Collection (requires 'Collection :> System.Collections.IDictionary)> (requires 'Collection :> System.Collections.IDictionary)
Public Shared Function CreateIDictionaryInfo(Of TCollection As IDictionary) (options As JsonSerializerOptions, collectionInfo As JsonCollectionInfoValues(Of TCollection)) As JsonTypeInfo(Of TCollection)

類型參數

TCollection

這是該類型的通用定義。

參數

options
JsonSerializerOptions

用於 JsonSerializerOptions 序列化與反序列化。

collectionInfo
JsonCollectionInfoValues<TCollection>

提供關於集合類型的序列化元資料。

傳回

JsonTypeInfo<TCollection>

針對特定類型的序列化元資料。

備註

此 API 供 System.Text.Json 原始碼產生器的輸出使用,不應直接呼叫。

適用於