Share via


JsonTypeInfo.CreateJsonPropertyInfo(Type, String) Méthode

Définition

Crée un instance vide JsonPropertyInfo pour le actuelJsonTypeInfo.

public:
 System::Text::Json::Serialization::Metadata::JsonPropertyInfo ^ CreateJsonPropertyInfo(Type ^ propertyType, System::String ^ name);
public System.Text.Json.Serialization.Metadata.JsonPropertyInfo CreateJsonPropertyInfo (Type propertyType, string name);
member this.CreateJsonPropertyInfo : Type * string -> System.Text.Json.Serialization.Metadata.JsonPropertyInfo
Public Function CreateJsonPropertyInfo (propertyType As Type, name As String) As JsonPropertyInfo

Paramètres

propertyType
Type

Type déclaré pour la propriété .

name
String

Nom de propriété utilisé dans la sérialisation et la désérialisation JSON.

Retours

Un instance vide JsonPropertyInfo .

Exceptions

propertyType ou name est null.

propertyType ne peut pas être utilisé pour la sérialisation.

Le JsonTypeInfo instance a été verrouillé pour une modification ultérieure.

S’applique à