public static GetType ( |
||
assembly | ||
typeName | String | |
return |
/// <summary> /// Obtains the <c>Type</c> by checking if the /// <c>typeName</c> is possible a full type name, or /// just an namespace.typename and for the later case, /// it tries to load the type from the specified assembly /// </summary> /// <param name="assembly"></param> /// <param name="typeName"></param> /// <returns></returns> private Type ObtainType(Assembly assembly, String typeName) { if (typeName == null) { return(null); } if (typeName.IndexOf(',') == -1) { return(InferType(assembly, typeName)); } else { return(TypeLoadUtil.GetType(typeName)); } }
private IFacility InstatiateFacility(String facilityType) { Type type = TypeLoadUtil.GetType(facilityType); return((IFacility)Activator.CreateInstance(type)); }
/// <summary> /// This method always tries to obtain the type /// from the specified assembly. /// </summary> /// <param name="typeName"></param> /// <param name="assembly"></param> /// <returns></returns> private Type InferType(Assembly assembly, String typeName) { return(TypeLoadUtil.GetType(assembly, typeName)); }