internal static void CheckCacheValidity(MethodInfo methodInfo) { EnableCacheAttribute cache = methodInfo.GetCustomAttribute <EnableCacheAttribute>(); if (methodInfo.ReturnType == typeof(void) && cache != null) { throw new InvalidChannelMethodTargetException("EnableCache can not be applied to a method with return type void"); } }
private bool IsCached(MethodInfo methodInfo) { EnableCacheAttribute cache = methodInfo.GetCustomAttribute <EnableCacheAttribute>(); if (methodInfo.ReturnType == typeof(void)) { throw new InvalidChannelMethodTargetException("EnableCache can not be applied to a method with return type void"); } return(cache != null); }
internal bool IsCached(MethodInfo methodInfo) { EnableCacheAttribute cache = methodInfo.GetCustomAttribute <EnableCacheAttribute>(); return(cache != null); }