JsonMetadataServices.CreateObjectInfo<T> Méthode

Définition

Crée des métadonnées pour une classe ou un struct complexe.

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)

Paramètres de type

T

Type de la classe ou du struct.

Paramètres

options
JsonSerializerOptions

À JsonSerializerOptions utiliser pour la sérialisation et la désérialisation.

objectInfo
JsonObjectInfoValues<T>

Fournit des métadonnées de sérialisation sur un type d’objet avec des constructeurs, des propriétés et des champs.

Retours

Instance JsonTypeInfo<T> représentant la classe ou le struct.

Exceptions

options ou objectInfo est null.

Remarques

Cette API est utilisée par la sortie du générateur source System.Text.Json et ne doit pas être appelée directement.

S’applique à