CorrelationToken.SubscribeForCorrelationTokenInitializedEvent(Activity, IActivityEventListener<CorrelationTokenEventArgs>) 方法

定义

CorrelationToken 订阅已初始化事件。Subscribes the CorrelationToken to the initialized event.

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 的名称。The name of the Activity that owns the correlation token.

dataChangeListener
IActivityEventListener<CorrelationTokenEventArgs>

侦听事件数据的更改的 CorrelationTokenEventArgsThe CorrelationTokenEventArgs that is listening for a change in event data.

例外

activitydataChangeListener 为空引用(在 Visual Basic 中为 Nothing)。activity or dataChangeListener are null references (Nothing in Visual Basic).

适用于