Class CommonTypeExtensions
System.Type extensions.
Inheritance
Namespace: System
Assembly: Copper.Common.dll
Syntax
public static class CommonTypeExtensions
Methods
View SourceGetGenericMethodDefinition(Type, String, BindingFlags, Type[])
Returns a System.Reflection.MethodInfo object that represents a generic method definition from which the method can be constructed.
Declaration
public static MethodInfo GetGenericMethodDefinition(this Type type, string name, BindingFlags bindingFlags, params Type[] typeArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type on which the generic method is declared. |
System.String | name | The name of the generic method. |
System.Reflection.BindingFlags | bindingFlags | A bitwise combination of the enumeration values that specify how the search is conducted. |
System.Type[] | typeArguments | An array of types to be substituted for the type parameters of the current generic method definition. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object that represents the constructed method formed by substituting the elements of typeArguments for the type parameters of the current generic method definition. |
GetGenericMethodDefinition(Type, String, Type[])
Returns a System.Reflection.MethodInfo object that represents a generic method definition from which the method can be constructed.
Declaration
public static MethodInfo GetGenericMethodDefinition(this Type type, string name, params Type[] typeArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type on which the generic method is declared. |
System.String | name | The name of the generic method. |
System.Type[] | typeArguments | An array of types to be substituted for the type parameters of the current generic method definition. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A System.Reflection.MethodInfo object that represents the constructed method formed by substituting the elements of typeArguments for the type parameters of the current generic method definition. |