CallExternalMethodActivity.OnMethodInvoking(EventArgs) Method

Definition

Provides a hook for derived classes to set ParameterBindings. This method is called just before the external method is run.

C#
protected virtual void OnMethodInvoking(EventArgs e);

Parameters

e
EventArgs

An EventArgs that contains the data for the MethodInvoking event.

Examples

The following example demonstrates an implementation of the OnMethodInvoking method. This example is from the Correlated Local Service SDK sample, from the CreateTask.cs file. For more information, see Correlated Local Service Sample.

C#
protected override void OnMethodInvoking(EventArgs e)
{
    this.ParameterBindings["taskId"].Value = this.TaskId;
    this.ParameterBindings["assignee"].Value = this.Assignee;
    this.ParameterBindings["text"].Value = this.Text;
}

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also