JsonMetadataServices.CreateArrayInfo<TElement> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為陣列建立序列化元資料。
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 原始碼產生器的輸出使用,不應直接呼叫。