private void AddPredicate(Func <T, bool> predicate, Internal.PredicateCombinator combinator) { if (_tree.Combinator == combinator) { _tree.AddPredicate(new StatementTree <T>(predicate)); } else { _tree = new PredicatePredicateTree <T>(_tree.Combinator.LogicalComplement(), _tree); _tree.AddPredicate(new StatementTree <T>(predicate)); } }
public FluentPredicateBuilder() { _tree = new PredicatePredicateTree <T>(Internal.PredicateCombinator.And); }
public PredicatePredicateTree(PredicateCombinator combinator, IPredicateTree <T> firstChild) : this(combinator) { AddPredicate(firstChild); }