예제 #1
0
        public ValidationResult IsValid2(T subject)
        {
            var leftResult  = leftValidator.IsValid2(subject);
            var rightResult = rightValidator.IsValid2(subject);

            return(new AndValidationResult(leftResult, rightResult));
        }
예제 #2
0
        public ValidationResult IsValid2(T subject)
        {
            var leftResult = leftValidator.IsValid2(subject);

            if (leftResult.Result)
            {
                return(new OrValidationResult(leftResult));
            }

            var rightResult = rightValidator.IsValid2(subject);

            return(new OrValidationResult(leftResult, rightResult));
        }