JsonTypeInfo.OnSerializing Propriété

Définition

Obtient ou définit un rappel à appeler avant la sérialisation.

public:
 property Action<System::Object ^> ^ OnSerializing { Action<System::Object ^> ^ get(); void set(Action<System::Object ^> ^ value); };
public Action<object>? OnSerializing { get; set; }
member this.OnSerializing : Action<obj> with get, set
Public Property OnSerializing As Action(Of Object)

Valeur de propriété

Exceptions

L’instance JsonTypeInfo a été verrouillée pour une modification supplémentaire.

- ou -

Les rappels de sérialisation ne sont pris en charge que pour Object les métadonnées.

Remarques

Pour les contrats provenant ou DefaultJsonTypeInfoResolverJsonSerializerContext, la valeur de ce rappel est mappée à partir de n’importe quelle IJsonOnSerializing implémentation sur le type.

S’applique à