Class MethodBaseExtensions
Contains extensions for the MethodBase class.
Inherited Members
Namespace: TheXDS.MCART.Types.Extensions
Assembly: MCART.dll
Syntax
public static class MethodBaseExtensions
Methods
| Edit this page View SourceFullName(MethodBase)
Gets a full name for a method, including the type and the namespace where the same has been defined.
Declaration
public static string FullName(this MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
MethodBase | method | Method from which to get the full name. |
Returns
Type | Description |
---|---|
string | The full name of the method, including the type and the namespace where the same has been defined. |
GetBindingFlags(MethodBase)
Infers the BindingFlags used in the definition of the method.
Declaration
public static BindingFlags GetBindingFlags(this MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
MethodBase | method | Method for which to infer the BindingFlags. |
Returns
Type | Description |
---|---|
BindingFlags | The BindingFlags inferred based on the properties of the method. |
GetParameterTypes(MethodBase)
Gets an array with the parameter types of the method.
Declaration
public static Type[] GetParameterTypes(this MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
MethodBase | method | Method from which to extract the collection of parameter types. |
Returns
Type | Description |
---|---|
Type[] | An array with the types of each of the parameters of the method. |
IsOverridden(MethodBase, object)
Determines if the specified method has been overridden in the provided instance.
Declaration
public static bool IsOverridden(this MethodBase method, object instance)
Parameters
Type | Name | Description |
---|---|---|
MethodBase | method | Method to check. |
object | instance | Instance in which to perform the check. Generally, this argument should be this. |
Returns
Type | Description |
---|---|
bool | true if the method has been overridden in the instance specified, false otherwise. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
InvalidTypeException | Thrown if the definition of |