InvokeStaticMethod

.NET Vuser Functions

Invokes a static method.

object InvokeStaticMethod(Type type, string methodName, int metadataToken, object[] parameters);
typeThe method type.
methodNameThe name of the method.
metadataTokenThe metadataToken of the method.
parametersThe method parameters.

InvokeStaticMethod Invokes a static method and 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 static method named InternalGetInstance.

public static AccessModifiers.PublicClass InternalGetInstance(AccessModifiers.PublicClass instance) {
	object[] parameters = new object[] {instance};
	object result =  LrReplayUtils.InvokeStaticMethod(typeof(AccessModifiers.PublicClass), "InternalGetInstance", 100663361, parameters);
	return ((AccessModifiers.PublicClass)(result));
}