private static Func <TItemToTest, bool> GetPredicate <TFilter, TItemToTest>(
     this IFilterNode <TFilter> filterNode,
     Func <TFilter, Func <TItemToTest, bool> > itemPredicate)
 => filterNode.Aggregate(
     Combine,
     Invert,
     leafFilterNode => itemPredicate(leafFilterNode.Filter));
Ejemplo n.º 2
0
 // TODO: Maybe this can be made private/internal?
 public static Func <TItemToTest, bool> GetPredicate <TLeafNode, TItemToTest>(
     this IFilterNode <TLeafNode> filter,
     Func <TLeafNode, Func <TItemToTest, bool> > itemPredicate)
     where TLeafNode : class, ILeafFilterNode
 {
     return(filter.Aggregate(
                Combine,
                Invert,
                itemPredicate));
 }