CallExternalMethodActivity.OnMethodInvoking(EventArgs) Metodo

Definizione

Fornisce un hook pr consentire alle classi derivate di impostare ParameterBindings. Questo metodo viene chiamato subito prima dell'esecuzione del metodo esterno.

protected:
 virtual void OnMethodInvoking(EventArgs ^ e);
protected virtual void OnMethodInvoking (EventArgs e);
abstract member OnMethodInvoking : EventArgs -> unit
override this.OnMethodInvoking : EventArgs -> unit
Protected Overridable Sub OnMethodInvoking (e As EventArgs)

Parametri

e
EventArgs

Una classe EventArgs che contiene i dati per l'evento MethodInvoking.

Esempio

Nell'esempio seguente viene illustrata un'implementazione del metodo OnMethodInvoking. Questo esempio è tratto dall'esempio SDK Correlated Local Service, nel file CreateTask.cs. Per altre informazioni, vedere Esempio di servizio locale correlato.

protected override void OnMethodInvoking(EventArgs e)
{
    this.ParameterBindings["taskId"].Value = this.TaskId;
    this.ParameterBindings["assignee"].Value = this.Assignee;
    this.ParameterBindings["text"].Value = this.Text;
}
Protected Overrides Sub OnMethodInvoking(ByVal e As EventArgs)
    Me.ParameterBindings("taskId").Value = Me.TaskId
    Me.ParameterBindings("assignee").Value = Me.Assignee
    Me.ParameterBindings("text").Value = Me.Text
End Sub

Si applica a

Vedi anche