/// <summary> /// Returns <c>true</c> if either <see cref="CacheResultAttribute"/> or /// <see cref="CacheResultItemsAttribute"/> is applied to the /// <paramref name="method"/>. /// </summary> /// <param name="method"> /// Method to check. /// </param> /// <param name="targetType"> /// Type of target object. /// </param> /// <returns> /// <c>true</c> if either <see cref="CacheResultAttribute"/> or /// <see cref="CacheResultItemsAttribute"/> is applied to the /// <paramref name="method"/>; <c>false</c> otherwise. /// </returns> public override bool Matches(System.Reflection.MethodInfo method, Type targetType) { return(method.IsDefined(typeof(CacheResultAttribute), Inherit) || method.IsDefined(typeof(CacheResultItemsAttribute), Inherit)); }