示例#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);
 }