public static IsExtensionType ( Type type ) : bool | ||
type | Type | |
return | bool |
public static bool IsExtensionType(Type type) {
return type.IsDefined(TYPE_EXTENSIONATTRIBUTE, false);
}
public static bool IsExtensionMethod(MemberInfo method) {
public void LoadExtension(Type type) { if ((type != null) && Util.IsExtensionType(type)) { foreach (MethodInfo info in type.GetMethods(BindingFlags.FlattenHierarchy | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance)) { if (Util.IsExtensionMethod(info)) { this.GetScorpioType(info.GetParameters()[0].ParameterType).AddExtensionMethod(info); } } } }