Aracılığıyla paylaş


JsonMetadataServices.CreateICollectionInfo<TCollection,TElement> Yöntem

Tanım

öğesine atanabilir ICollection<T>türler için meta veriler oluşturur.

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

Tür Parametreleri

TCollection

Türün genel tanımı.

TElement

Öğe türünün genel tanımı.

Parametreler

options
JsonSerializerOptions

JsonSerializerOptions serileştirme ve seri durumdan çıkarma için kullanılacak.

collectionInfo
JsonCollectionInfoValues<TCollection>

Koleksiyon türü hakkında serileştirme meta verileri sağlar.

Döndürülenler

JsonTypeInfo<TCollection>

Verilen tür için serileştirme meta verileri.

Açıklamalar

Bu API, System.Text.Json kaynak oluşturucusunun çıkışı tarafından kullanılır ve doğrudan çağrılmamalıdır.

Şunlara uygulanır