Class Type<T>.Method<TParam>
Provides access to methods with single parameter declared in type T
.
Inherited Members
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Method<TParam>
Type Parameters
Name | Description |
---|---|
TParam | Type of method parameter. |
Methods
| Improve this Doc View SourceGet(String, Boolean)
Reflects instance method with single parameter and without return type as delegate type Action<T1,T2>.
Declaration
public static Method<Action<T, TParam>> Get(string methodName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | methodName | The name of the method. |
Boolean | nonPublic | true to reflect non-public method. |
Returns
Type | Description |
---|---|
Method<Action<T, TParam>> | The reflected method; otherwise, null if method doesn't exist. |
Get<TResult>(String, Boolean)
Reflects instance method with single parameter as delegate type Func<T1,T2,TResult>.
Declaration
public static Method<Func<T, TParam, TResult>> Get<TResult>(string methodName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | methodName | The name of the method. |
Boolean | nonPublic | true to reflect non-public method. |
Returns
Type | Description |
---|---|
Method<Func<T, TParam, TResult>> | The reflected method; otherwise, null if method doesn't exist. |
Type Parameters
Name | Description |
---|---|
TResult | The method return type. |
GetStatic(String, Boolean)
Reflects static method with single parameter and without return type as delegate type Action<T>.
Declaration
public static Method<Action<TParam>> GetStatic(string methodName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | methodName | The name of the method. |
Boolean | nonPublic | true to reflect non-public method. |
Returns
Type | Description |
---|---|
Method<Action<TParam>> | The reflected method; otherwise, null if method doesn't exist. |
GetStatic<TResult>(String, Boolean)
Reflects static method with single parameter as delegate type Func<T,TResult>.
Declaration
public static Method<Func<TParam, TResult>> GetStatic<TResult>(string methodName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | methodName | The name of the method. |
Boolean | nonPublic | true to reflect non-public method. |
Returns
Type | Description |
---|---|
Method<Func<TParam, TResult>> | The reflected method; otherwise, null if method doesn't exist. |
Type Parameters
Name | Description |
---|---|
TResult | The method return type. |
Require(String, Boolean)
Reflects instance method with single parameter and without return type as delegate type Action<T1,T2>.
Declaration
public static Method<Action<T, TParam>> Require(string methodName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | methodName | The name of the method. |
Boolean | nonPublic | true to reflect non-public method. |
Returns
Type | Description |
---|---|
Method<Action<T, TParam>> | The reflected method. |
Exceptions
Type | Condition |
---|---|
MissingMethodException | The requested method doesn't exist. |
Require<TResult>(String, Boolean)
Reflects instance method with single parameter as delegate type Func<T1,T2,TResult>.
Declaration
public static Method<Func<T, TParam, TResult>> Require<TResult>(string methodName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | methodName | The name of the method. |
Boolean | nonPublic | true to reflect non-public method. |
Returns
Type | Description |
---|---|
Method<Func<T, TParam, TResult>> | The reflected method. |
Type Parameters
Name | Description |
---|---|
TResult | The method return type. |
Exceptions
Type | Condition |
---|---|
MissingMethodException | The requested method doesn't exist. |
RequireStatic(String, Boolean)
Reflects static method with single parameter and without return type as delegate type Action<T>.
Declaration
public static Method<Action<TParam>> RequireStatic(string methodName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | methodName | The name of the method. |
Boolean | nonPublic | true to reflect non-public method. |
Returns
Type | Description |
---|---|
Method<Action<TParam>> | The reflected method. |
Exceptions
Type | Condition |
---|---|
MissingMethodException | The requested method doesn't exist. |
RequireStatic<TResult>(String, Boolean)
Reflects static method with single parameter as delegate type Func<T,TResult>.
Declaration
public static Method<Func<TParam, TResult>> RequireStatic<TResult>(string methodName, bool nonPublic = false)
Parameters
Type | Name | Description |
---|---|---|
String | methodName | The name of the method. |
Boolean | nonPublic | true to reflect non-public method. |
Returns
Type | Description |
---|---|
Method<Func<TParam, TResult>> | The reflected method. |
Type Parameters
Name | Description |
---|---|
TResult | The method return type. |
Exceptions
Type | Condition |
---|---|
MissingMethodException | The requested method doesn't exist. |