Redigera

Dela via


IEventActivity.Unsubscribe Method

Definition

Cancels the subscription of an Activity to an event.

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))

Parameters

parentContext
ActivityExecutionContext

The ActivityExecutionContext that represents the execution environment of the Activity.

parentEventHandler
IActivityEventListener<QueueEventArgs>

The EventHandler for the parent event.

Remarks

The following code example shows how to use the Unsubscribe method. This code example is part of the FileWatcher SDK Sample from the FileSystemEvent.cs file. For more information, see File System Watcher Activity.

// 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)

Applies to