Class Type<T>.Method<P>
Provides access to methods with single parameter declared in type T.
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Method<P> : object
  Type Parameters
| Name | Description | 
|---|---|
| P | 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 
Declaration
public static Method<Action<T, P>> 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, P>> | The reflected method; otherwise, null if method doesn't exist.  | 
      
Get<R>(String, Boolean)
Reflects instance method with single parameter as delegate type 
Declaration
public static Method<Func<T, P, R>> Get<R>(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, P, R>> | The reflected method; otherwise, null if method doesn't exist.  | 
      
Type Parameters
| Name | Description | 
|---|---|
| R | The method return type.  | 
      
GetStatic(String, Boolean)
Reflects static method with single parameter and without return type as delegate type 
Declaration
public static Method<Action<P>> 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<P>> | The reflected method; otherwise, null if method doesn't exist.  | 
      
GetStatic<R>(String, Boolean)
Reflects static method with single parameter as delegate type 
Declaration
public static Method<Func<P, R>> GetStatic<R>(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<P, R>> | The reflected method; otherwise, null if method doesn't exist.  | 
      
Type Parameters
| Name | Description | 
|---|---|
| R | The method return type.  | 
      
Require(String, Boolean)
Reflects instance method with single parameter and without return type as delegate type 
Declaration
public static Method<Action<T, P>> 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, P>> | The reflected method.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| MissingMethodException | The requested method doesn't exist.  | 
      
Require<R>(String, Boolean)
Reflects instance method with single parameter as delegate type 
Declaration
public static Method<Func<T, P, R>> Require<R>(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, P, R>> | The reflected method.  | 
      
Type Parameters
| Name | Description | 
|---|---|
| R | 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 
Declaration
public static Method<Action<P>> 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<P>> | The reflected method.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| MissingMethodException | The requested method doesn't exist.  | 
      
RequireStatic<R>(String, Boolean)
Reflects static method with single parameter as delegate type 
Declaration
public static Method<Func<P, R>> RequireStatic<R>(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<P, R>> | The reflected method.  | 
      
Type Parameters
| Name | Description | 
|---|---|
| R | The method return type.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| MissingMethodException | The requested method doesn't exist.  |