Share via


IEventActivity.Unsubscribe Metodo

Definizione

Annulla la sottoscrizione di un'attività Activity a un evento.

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

Parametri

parentContext
ActivityExecutionContext

Elemento ActivityExecutionContext che rappresenta l’ambiente di esecuzione dell’elemento Activity.

parentEventHandler
IActivityEventListener<QueueEventArgs>

Elemento EventHandler dell’evento padre.

Commenti

Nell'esempio di codice riportato di seguito viene illustrato come utilizzare il metodo Unsubscribe. Questo esempio di codice è parte dell'esempio SDK FileWatcher nel file FileSystemEvent.cs. Per altre informazioni, vedere Attività Watcher di File System.

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

Si applica a