public void AndWith(FilterCollection <T> other) { if (MyPredicate == null) { MyPredicate = PredicateBuilderExtension.True <T>(); } MyPredicate = MyPredicate.And(other.MyPredicate); }
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); }