Sdílet prostřednictvím


IEventActivity.Unsubscribe Metoda

Definice

Zruší odběr Activity události.

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

Parametry

parentContext
ActivityExecutionContext

Jedná se ActivityExecutionContext o spouštěcí prostředí objektu Activity.

parentEventHandler
IActivityEventListener<QueueEventArgs>

Objekt EventHandler pro nadřazenou událost.

Poznámky

Následující příklad kódu ukazuje, jak použít metodu Unsubscribe . Tento příklad kódu je součástí ukázky sady FileWatcher SDK ze souboru FileSystemEvent.cs. Další informace najdete v tématu Aktivita sledovacího procesu systému souborů.

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

Platí pro