IEventActivity.Unsubscribe 方法

定义

取消 Activity 对事件的订阅。

public:
 void Unsubscribe(System::Workflow::ComponentModel::ActivityExecutionContext ^ parentContext, System::Workflow::ComponentModel::IActivityEventListener<System::Workflow::ComponentModel::QueueEventArgs ^> ^ parentEventHandler);
public void Unsubscribe (System.Workflow.ComponentModel.ActivityExecutionContext parentContext, System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.QueueEventArgs> parentEventHandler);
abstract member Unsubscribe : System.Workflow.ComponentModel.ActivityExecutionContext * System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.QueueEventArgs> -> unit
Public Sub Unsubscribe (parentContext As ActivityExecutionContext, parentEventHandler As IActivityEventListener(Of QueueEventArgs))

参数

parentContext
ActivityExecutionContext

表示 ActivityExecutionContext 的执行环境的 Activity

parentEventHandler
IActivityEventListener<QueueEventArgs>

父事件的 EventHandler

注解

下面的代码示例说明如何使用 Unsubscribe 方法。 此代码示例摘自 FileSystemEvent.cs 文件中的“FileWatcher”SDK 示例。 有关详细信息,请参阅 文件系统观察程序活动

// Add an instance of the External Data Exchange Service
ExternalDataExchangeService externalDataExchangeService = new ExternalDataExchangeService();
workflowRuntime.AddService(externalDataExchangeService);
' Add an instance of the External Data Exchange Service
Dim externalDataExchange As New ExternalDataExchangeService()
workflowRuntime.AddService(externalDataExchange)

适用于