JsonTypeInfo.OnSerializing 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在序列化發生前,取得或設定回調以呼叫。
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)
屬性值
例外狀況
備註
對於來自 DefaultJsonTypeInfoResolver 或 JsonSerializerContext的合約,該回調的值將從該型別上的任何 IJsonOnSerializing 實作映射而來。