예제 #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));
     }
 }
예제 #2
0
 public FluentPredicateBuilder()
 {
     _tree = new PredicatePredicateTree <T>(Internal.PredicateCombinator.And);
 }
예제 #3
0
 public PredicatePredicateTree(PredicateCombinator combinator, IPredicateTree <T> firstChild) : this(combinator)
 {
     AddPredicate(firstChild);
 }