JsonMetadataServices.CreateDictionaryInfo<TCollection,TKey,TValue> Metod

Definition

Skapar metadata för typer som kan tilldelas till Dictionary<TKey,TValue>.

public:
generic <typename TCollection, typename TKey, typename TValue>
 where TCollection : System::Collections::Generic::Dictionary<TKey, TValue> static System::Text::Json::Serialization::Metadata::JsonTypeInfo<TCollection> ^ CreateDictionaryInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonCollectionInfoValues<TCollection> ^ collectionInfo);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<TCollection> CreateDictionaryInfo<TCollection,TKey,TValue>(System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<TCollection> collectionInfo) where TCollection : System.Collections.Generic.Dictionary<TKey,TValue>;
static member CreateDictionaryInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<'Collection (requires 'Collection :> System.Collections.Generic.Dictionary<'Key, 'Value>)> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Collection (requires 'Collection :> System.Collections.Generic.Dictionary<'Key, 'Value>)> (requires 'Collection :> System.Collections.Generic.Dictionary<'Key, 'Value>)
Public Shared Function CreateDictionaryInfo(Of TCollection As Dictionary(Of TKey, TValue), TKey As Dictionary(Of TKey, TValue), TValue As Dictionary(Of TKey, TValue)) (options As JsonSerializerOptions, collectionInfo As JsonCollectionInfoValues(Of TCollection)) As JsonTypeInfo(Of TCollection)

Typparametrar

TCollection

Den allmänna definitionen av typen.

TKey

Den allmänna definitionen av nyckeltypen.

TValue

Den allmänna definitionen av värdetypen.

Parametrar

options
JsonSerializerOptions

Att JsonSerializerOptions använda för serialisering och deserialisering.

collectionInfo
JsonCollectionInfoValues<TCollection>

Innehåller serialiseringsmetadata om samlingstypen.

Returer

JsonTypeInfo<TCollection>

Serialiseringsmetadata för den angivna typen.

Kommentarer

Det här API:et används av utdata från System.Text.Json-källgeneratorn och bör inte anropas direkt.

Gäller för