ReflectionExtensionMethods
Provides a set of extension methods for System.Reflection.Assembly.
Methods
public static IEnumerable<Type> AllPublicClassImplementations(this Assembly assembly, Type type, bool filterEmptyConstructors)
Enumerate over all public types which derive from a specific class or interface. Abstract classes are skipped, but generic classes are included.
public static MethodInfo FindInstanceMethod(this Type type, string name, bool public = true, Type constraint = null)
Find the instance method on a type.
public static MethodInfo FindStaticMethod(this Type type, string name, bool public = true, Type constraint = null)
Find the static method on a type.
Gets the type constraint of this parameter. It will either be object If the parameter derives from Parameter or implements IParameter directly, or the T constraint for a type which derives from Parameter<T>.
Parameters:
| parameter (IParameter) |
Test whether a type has an empty, public constructor.
Parameters:
| type (Type) | Type to check. |
Returns: True if a public, empty constructor exists.
Gets whether a type is a final type. Interfaces, abstract classes and classes with generic constraints are not final.
Parameters:
| type (Type) |
Gets whether one type if a kind of another type. I.e. whether 'type' can be assigned to 'other'.
Test whether a virtual method has been re-implemented in a more derived type.
Test whether a virtual method has been re-implemented.
Gets the sentence used in the user interface decribing the character of the given conversion merit.
Parameters:
| merit (Merit) |