private static HookAttribute[] GetHookAttributes(MethodInfo method) { return (HookAttribute[])method.GetCustomAttributes(typeof(AfterAttribute), true); }