public static bool IsValidMethod(MethodInfo method) { bool hasAHookAttribute = GetHookAttributes(method).Length == 1; bool hasNoParameters = method.GetParameters().Length == 0; return hasAHookAttribute && hasNoParameters; }