Пример #1
0
 public void AndWith(FilterCollection <T> other)
 {
     if (MyPredicate == null)
     {
         MyPredicate = PredicateBuilderExtension.True <T>();
     }
     MyPredicate = MyPredicate.And(other.MyPredicate);
 }
Пример #2
0
 public new void Add(IFilter <T> f)
 {
     if (f.IsEnabled)
     {
         if (f.DoAnd)
         {
             if (MyPredicate == null)
             {
                 MyPredicate = PredicateBuilderExtension.True <T>();
             }
             MyPredicate = MyPredicate.And(f.MyExpressionFunc);
         }
         else
         {
             if (MyPredicate == null)
             {
                 MyPredicate = PredicateBuilderExtension.False <T>();
             }
             MyPredicate = MyPredicate.Or(f.MyExpressionFunc);
         }
     }
     base.Add(f);
 }