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))); }
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)); }