Devesprit.Scripter

Extensions..::..InvokeMethod Method

Is for executing a method from an Assembly and getting its output.

Namespace:  Devesprit.Scripter.Utils
Assembly:  Devesprit Scripter (in Devesprit Scripter.dll)

Syntax


public static MethodInvokeResult InvokeMethod(
	this Assembly asm,
	string methodName,
	Object[] methodArgs,
	Object[] methodClassConstructorArgs,
	bool caseSensitive,
	InvokeContext invokeContext
)
<ExtensionAttribute> _
Public Shared Function InvokeMethod ( _
	asm As Assembly, _
	methodName As String, _
	methodArgs As Object(), _
	methodClassConstructorArgs As Object(), _
	caseSensitive As Boolean, _
	invokeContext As InvokeContext _
) As MethodInvokeResult
[ExtensionAttribute]
public:
static MethodInvokeResult^ InvokeMethod(
	Assembly^ asm, 
	String^ methodName, 
	array<Object^>^ methodArgs, 
	array<Object^>^ methodClassConstructorArgs, 
	bool^ caseSensitive, 
	InvokeContext^ invokeContext
)

Parameters

asm
Type: Assembly
The intended Assembly.
methodName
Type: String
FullName or Name of the intended method.
methodArgs
Type: array<Object>[]()[][]
Is an object array containing the input parameters of the intended method.
methodClassConstructorArgs
Type: array<Object>[]()[][]
If the intended method is not static and the constructor method of the class - which contains the intended method - has an input parameter, you can employ the required parameters for creating an instance from the related class using this argument.
caseSensitive
Type: Boolean
if set to true the intended method will be searched as case sensitive.
invokeContext
Type: Devesprit.Scripter..::..InvokeContext
The intended context for executing the method, see InvokeContext.

Return Value

The output is an object from MethodInvokeResult class containing the return value of the intended method.