Partilhar via


IEventActivity.Unsubscribe Método

Definição

Cancela a assinatura de um Activity a um 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))

Parâmetros

parentContext
ActivityExecutionContext

O ActivityExecutionContext que representa o ambiente de execução do Activity.

parentEventHandler
IActivityEventListener<QueueEventArgs>

O EventHandler para o evento pai.

Comentários

O exemplo de código a seguir mostra como usar o método Unsubscribe. Este exemplo de código faz parte do Exemplo de SDK do FileWatcher do arquivo FileSystemEvent.cs. Para obter mais informações, consulte Atividade do Observador do Sistema de Arquivos.

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

Aplica-se a