Taal

JsonMetadataServices.CreateImmutableEnumerableInfo<TCollection,TElement> Methode

Definitie

Hiermee maakt u metagegevens voor niet-woordenlijst onveranderbare verzamelingstypen.

public:
generic <typename TCollection, typename TElement>
 where TCollection : System::Collections::Generic::IEnumerable<TElement> static System::Text::Json::Serialization::Metadata::JsonTypeInfo<TCollection> ^ CreateImmutableEnumerableInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues<TCollection> ^ collectionInfo, Func<System::Collections::Generic::IEnumerable<TElement> ^, TCollection> ^ createRangeFunc);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<TCollection> CreateImmutableEnumerableInfo<TCollection,TElement>(System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<TCollection> collectionInfo, Func<System.Collections.Generic.IEnumerable<TElement>,TCollection> createRangeFunc) where TCollection : System.Collections.Generic.IEnumerable<TElement>;
static member CreateImmutableEnumerableInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<#seq<'Element>> * Func<seq<'Element>, #seq<'Element>> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<#seq<'Element>>
Public Shared Function CreateImmutableEnumerableInfo(Of TCollection As IEnumerable(Of TElement), TElement As IEnumerable(Of TElement)) (options As JsonSerializerOptions, collectionInfo As JsonCollectionInfoValues(Of TCollection), createRangeFunc As Func(Of IEnumerable(Of TElement), TCollection)) As JsonTypeInfo(Of TCollection)

Type parameters

TCollection

De algemene definitie van het type.

TElement

De algemene definitie van het elementtype.

Parameters

options
JsonSerializerOptions

De JsonSerializerOptions te gebruiken voor serialisatie en deserialisatie.

collectionInfo
JsonCollectionInfoValues<TCollection>

Biedt serialisatiemetagegevens over het verzamelingstype.

createRangeFunc
Func<IEnumerable<TElement>,TCollection>

Een methode voor het maken van een onveranderbaar woordenlijstexemplaren.

Retouren

JsonTypeInfo<TCollection>

Serialisatiemetagegevens voor het opgegeven type.

Opmerkingen

Deze API is bedoeld voor gebruik door de uitvoer van de System.Text.Json-brongenerator en mag niet rechtstreeks worden aangeroepen.

Van toepassing op