SendActivity.BeforeSend Evento

Definición

Se produce antes de que la actividad SendActivity envíe el mensaje al servicio.Occurs before the SendActivity activity sends the message to the service.

public:
 event EventHandler<System::Workflow::Activities::SendActivityEventArgs ^> ^ BeforeSend;
[System.ComponentModel.Browsable(true)]
public event EventHandler<System.Workflow.Activities.SendActivityEventArgs> BeforeSend;
[<System.ComponentModel.Browsable(true)>]
member this.BeforeSend : EventHandler<System.Workflow.Activities.SendActivityEventArgs> 
Public Custom Event BeforeSend As EventHandler(Of SendActivityEventArgs) 

Tipo de evento

EventHandler<SendActivityEventArgs>
Atributos

Ejemplos

En el siguiente ejemplo se muestra cómo utilizar el evento BeforeSend.The following example shows how to use the BeforeSend event. Este ejemplo se adaptó del ejemplo de SDK Conversations.This example was adapted from the Conversations SDK sample.

[System.Diagnostics.DebuggerNonUserCode]
private void InitializeComponent()
{
    SendActivity sendActivity1 = new SendActivity();
    sendActivity1.BeforeSend += new EventHandler<SendActivityEventArgs>(sendActivity1_BeforeSend);
}

void sendActivity1_BeforeSend(object sender, SendActivityEventArgs e)
{
    Console.WriteLine("SendActivity1 BeforeSend event fired.");
}

void sendActivity1_AfterResponse(object sender, SendActivityEventArgs e)
{
    Console.WriteLine("SendActivity1 AfterResponse event fired.");
}

Comentarios

El controlador de eventos asociado a este evento puede utilizarse para establecer los valores de parámetro de la operación de servicio que se invoca.This event handler associated with this event can be used to set the parameter values for the service operation being invoked.

Nota

El contexto de una SendActivity no puede establecerse en este controlador de eventos.The context of a SendActivity cannot be set in this event handler.

Se aplica a