コード例 #1
0
        internal IfThenConstraint(IfPredicate <T> ifTest, Expression <Func <T, bool> > predicate)
        {
            Condition   = predicate;
            IfPredicate = ifTest;

            InnerConstraint = new ConditionalConstraint <T>(BuildInternalConstraint(IfPredicate.Predicate.Body, Condition.Body, Expression.Constant(true)));
        }
コード例 #2
0
        internal IfThenElseConstraint(IfThenConstraint <T> ifThen, Expression <Func <T, bool> > predicate)
        {
            Condition = predicate;
            IfThen    = ifThen;

            InnerConstraint = new ConditionalConstraint <T>(IfThenConstraint <T> .BuildInternalConstraint(IfThen.IfPredicate.Predicate.Body, IfThen.Condition.Body, Condition.Body));
        }