The ReflectionsExtensions Class which provides some additional and convenience Reflection functions.
Static Public Member Functions | |
static T | CopyMembers< T > (T original, T destination) |
A Fairly dangerous function to use, it copies all non-static fields and properties from one instance of an object to another object of the same type. | |
static Action | CreateActionFromMethodInfoAndInstance (this MethodInfo methodInfo, object instance) |
Creates a delegate that will invoke the function specified in the methodInfo, using the object specified in instance. No checks are performed, it is assumed that methodInfo represents a valid method of the object's type. | |
static List< Type > | GetAllDerivedClasses (this Type baseClass) |
Given a base type, find all classes, in all loaded assemblies, that are descendants of it. | |
static object | InstantiateSystemObjectOfType (System.Type typeToInstantiate) |
Creates a default/empty instance of an object of the provided type. Type must have a default constructor. | |
static List< Type > | StaticGetAllDerivedClasses (Type baseClass, bool sortResult=false, bool sortByNameNotFullName=true) |
This function will find and example all assemblies in the AppDomain. It will search them for all types that are derived from the provided baseClass type. | |