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 IFluentPredicateBuilder <T> WithPredicate(Func <T, bool> predicate) { _tree.AddPredicate(new StatementTree <T>(predicate)); return(this); }