语言

JsonMetadataServices.CreateIListInfo 方法

定义

重载

CreateIListInfo<TCollection,TElement>(JsonSerializerOptions, JsonCollectionInfoValues<TCollection>)

Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs

为可 IList<T>分配给的类型创建元数据。

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

类型参数

TCollection

类型的泛型定义。

TElement

元素类型的泛型定义。

参数

options
JsonSerializerOptions

JsonSerializerOptions用于序列化和反序列化。

collectionInfo
JsonCollectionInfoValues<TCollection>

提供有关集合类型的序列化元数据。

返回

JsonTypeInfo<TCollection>

给定类型的序列化元数据。

注解

此 API 供 System.Text.Json 源生成器的输出使用,不应直接调用。

适用于

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

Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs
Source:
JsonMetadataServices.Collections.cs

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

public:
generic <typename TCollection>
 where TCollection : System::Collections::IList static System::Text::Json::Serialization::Metadata::JsonTypeInfo<TCollection> ^ CreateIListInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues<TCollection> ^ collectionInfo);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<TCollection> CreateIListInfo<TCollection>(System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<TCollection> collectionInfo) where TCollection : System.Collections.IList;
static member CreateIListInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<'Collection (requires 'Collection :> System.Collections.IList)> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Collection (requires 'Collection :> System.Collections.IList)> (requires 'Collection :> System.Collections.IList)
Public Shared Function CreateIListInfo(Of TCollection As IList) (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 源生成器的输出使用,不应直接调用。

适用于