コード例 #1
0
 public override ValidationResult IsValid(object obj, ValidationContext context)
 {
     return
         (new BooleanToValidationResult().IsValid(
              (ValidationResult.Accepted == LeftOperand.IsValid(obj, context)) &&
              (ValidationResult.Accepted == RightOperand.IsValid(obj, context)), context));
 }
コード例 #2
0
        public override ValidationResult IsValid(object obj, ValidationContext context)
        {
            return((ValidationResult.Accepted == LeftOperand.IsValid(obj, context)) ||
                   (ValidationResult.Accepted == RightOperand.IsValid(obj, context))

                                ? ValidationResult.Accepted
                                : ValidationResult.Rejected);
        }