Class MethodWrapper

Namespace
Elegy.Common.Reflection
Assembly
Elegy.Common.dll

Utility to easily interact with C# methods.

public class MethodWrapper : MemberWrapper
Inheritance
MethodWrapper
Inherited Members

Constructors

MethodWrapper(MethodInfo)

Constructs a MethodWrapper from the given info, caching its metadata.

public MethodWrapper(MethodInfo info)

Parameters

info MethodInfo

Properties

Info

More detailed info about the method.

public MethodInfo Info { get; }

Property Value

MethodInfo

ReturnType

The return type of this method.

public Type ReturnType { get; }

Property Value

Type

Methods

Invoke(object)

Invokes this obj's method, with no return value and no arguments.

public void Invoke(object obj)

Parameters

obj object

Invoke(object, params object[])

Invokes this obj's method, with no return value.

public void Invoke(object obj, params object[] objects)

Parameters

obj object
objects object[]

Invoke<TReturn>(object)

Invokes this obj's method, with a return value but no arguments.

public TReturn? Invoke<TReturn>(object obj)

Parameters

obj object

Returns

TReturn

Type Parameters

TReturn

Invoke<TReturn>(object, params object[])

Invokes this obj's method, with a return value and one or more arguments.

public TReturn? Invoke<TReturn>(object obj, params object[] objects)

Parameters

obj object
objects object[]

Returns

TReturn

Type Parameters

TReturn