Partage via


IEventActivity.Unsubscribe Méthode

Définition

Annule l'abonnement d'une Activity à un événement.

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

Paramètres

parentContext
ActivityExecutionContext

ActivityExecutionContext représentant l'environnement d'exécution de la Activity.

parentEventHandler
IActivityEventListener<QueueEventArgs>

Le EventHandler de l'événement parent.

Remarques

L'exemple de code suivant montre comment utiliser la méthode Unsubscribe. Cet exemple de code fait partie de l'exemple du Kit de développement logiciel FileWatcher (SDK)qui provient du fichier FileSystemEvent.cs. Pour plus d’informations, consultez Activité de l’observateur du système de fichiers.

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

S’applique à