JsonMetadataServices.CreateIDictionaryInfo 方法

定义

重载

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

为可 IDictionary<TKey,TValue>分配给 的类型创建元数据。

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

为可 IDictionary分配给 的类型创建元数据。

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

Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
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>)

Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
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 源生成器的输出使用,不应直接调用。

适用于