public static bool IsExtensionMethod(this MethodInfo methodInfo) { return methodInfo.GetCustomAttribute<ExtensionAttribute>().HasValue; }