コード例 #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);
        }
コード例 #2
0
 private static bool Fallback(PredicateContext context) => !context.Handled;
コード例 #3
0
 private static bool Fallback(PredicateContext context)
 {
     return !context.Handled;
 }