共用方式為


JsonMetadataServices.CreateArrayInfo<TElement> 方法

定義

建立陣列的序列化中繼資料。

public:
generic <typename TElement>
 static System::Text::Json::Serialization::Metadata::JsonTypeInfo<cli::array <TElement> ^> ^ CreateArrayInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues<cli::array <TElement> ^> ^ collectionInfo);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<TElement[]> CreateArrayInfo<TElement>(System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<TElement[]> collectionInfo);
static member CreateArrayInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<'Element[]> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Element[]>
Public Shared Function CreateArrayInfo(Of TElement) (options As JsonSerializerOptions, collectionInfo As JsonCollectionInfoValues(Of TElement())) As JsonTypeInfo(Of TElement())

類型參數

TElement

專案類型的泛型定義。

參數

options
JsonSerializerOptions

要使用的序列化和還原序列化選項。

collectionInfo
JsonCollectionInfoValues<TElement[]>

提供有關集合類型的序列化中繼資料。

傳回

JsonTypeInfo<TElement[]>

指定型別的序列化中繼資料。

備註

此 API 可供 System.Text.Json 來源產生器的輸出使用,不應直接呼叫。

適用於