InvokeMethod

.NET Vuser Functions

Invokes a method.

object InvokeMethod(object targetObj,  string methodName, int metadataToken, object[] parameters)
targetObjThe target upon which to invoke the method.
methodNameThe name of the method.
metadataTokenThe metadataToken of the method.
parametersThe method parameters.

InvokeMethod invokes a method indicated by its name, type, and metadataToken. It returns the result of the method invocation.

Note: Do not add this function manually to a script. It is generated by VuGen automatically.

Parameterization

Parameterization is not applicable to this function.

Example

This example invokes the add_PublicMyEvent method.

public void add_PublicMyEvent(object value) {
      object[] parameters = new object[] {value};
      LrReplayUtils.InvokeMethod(this.target, "add_PublicMyEvent", 100663400, parameters);
}