JsonMetadataServices.CreateObjectInfo<T> Metod

Definition

Skapar metadata för en komplex klass eller struct.

public:
generic <typename T>
 static System::Text::Json::Serialization::Metadata::JsonTypeInfo<T> ^ CreateObjectInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonObjectInfoValues<T> ^ objectInfo);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> CreateObjectInfo<T>(System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<T> objectInfo);
static member CreateObjectInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<'T> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T>
Public Shared Function CreateObjectInfo(Of T) (options As JsonSerializerOptions, objectInfo As JsonObjectInfoValues(Of T)) As JsonTypeInfo(Of T)

Typparametrar

T

Typ av klass eller struct.

Parametrar

options
JsonSerializerOptions

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

objectInfo
JsonObjectInfoValues<T>

Tillhandahåller serialiseringsmetadata om en objekttyp med konstruktorer, egenskaper och fält.

Returer

En JsonTypeInfo<T> instans som representerar klassen eller structen.

Undantag

options eller objectInfo är null.

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