Exemple #1
0
        private bool CheckHashCode(PredicateContext context)
        {
            if (context.Consumer == null)
            {
                return(true);
            }

            var target     = context.Consumer.Target.Member;
            var attributes = target?.GetCustomAttributes(true);
            var hashCode   = attributes?.Sum(attr => attr.GetHashCode());

            HashCode = HashCode ?? hashCode;
            return(HashCode == hashCode);
        }
 private static bool Fallback(PredicateContext context) => !context.Handled;
 private static bool Fallback(PredicateContext context)
 {
     return !context.Handled;
 }