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