共用方式為


ActivityMarkupSerializer.OnBeforeSerialize 方法

定義

告知 ActivityMarkupSerializer,即將序列化物件。

protected:
 override void OnBeforeSerialize(System::Workflow::ComponentModel::Serialization::WorkflowMarkupSerializationManager ^ serializationManager, System::Object ^ obj);
protected override void OnBeforeSerialize (System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializationManager serializationManager, object obj);
override this.OnBeforeSerialize : System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializationManager * obj -> unit
Protected Overrides Sub OnBeforeSerialize (serializationManager As WorkflowMarkupSerializationManager, obj As Object)

參數

serializationManager
WorkflowMarkupSerializationManager

管理序列化處理序的 WorkflowMarkupSerializationManager

obj
Object

要序列化的 Object

例外狀況

serializationManagerobjwriter 包含 null 參考 (Visual Basic 中為 Nothing)。

obj 不是 Activity 型別。

備註

OnAfterSerialize 指定的活動上執行 Serialize 方法之前,立即呼叫 objOnBeforeSerialize 寫入活動的開頭 eXtensible Application Markup Language (XAML) 標記,包括任何必要屬性。

適用於