共用方式為


CorrelationToken.SubscribeForCorrelationTokenInitializedEvent 方法

定義

向已初始化的事件訂閱 CorrelationToken

public:
 void SubscribeForCorrelationTokenInitializedEvent(System::Workflow::ComponentModel::Activity ^ activity, System::Workflow::ComponentModel::IActivityEventListener<System::Workflow::Runtime::CorrelationTokenEventArgs ^> ^ dataChangeListener);
public void SubscribeForCorrelationTokenInitializedEvent (System.Workflow.ComponentModel.Activity activity, System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.Runtime.CorrelationTokenEventArgs> dataChangeListener);
member this.SubscribeForCorrelationTokenInitializedEvent : System.Workflow.ComponentModel.Activity * System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.Runtime.CorrelationTokenEventArgs> -> unit
Public Sub SubscribeForCorrelationTokenInitializedEvent (activity As Activity, dataChangeListener As IActivityEventListener(Of CorrelationTokenEventArgs))

參數

activity
Activity

擁有相互關聯權杖之 Activity 的名稱。

dataChangeListener
IActivityEventListener<CorrelationTokenEventArgs>

接聽在事件資料中之變更的 CorrelationTokenEventArgs

例外狀況

activitydataChangeListener 為 null 參考 (在 Visual Basic 中為 Nothing)。

適用於