Ejemplo n.º 1
0
        protected bool Filter(Tweet tweet)
        {
            if (Predicates.Count() == 0)
            {
                return(true);
            }

            if (IsOrSearch.Value)
            {
                return(Predicates.Any(predicate => predicate(tweet)));
            }
            else
            {
                return(Predicates.All(predicate => predicate(tweet)));
            }
        }
Ejemplo n.º 2
0
 /// <summary>Count how many predicates are false</summary>
 public int CountFalse(T item)
 {
     return(Predicates.Count(predicate => !predicate(item)));
 }
Ejemplo n.º 3
0
 /// <summary>Count how many predicates are true</summary>
 public int CountTrue(T item)
 {
     return(Predicates.Count(predicate => predicate(item)));
 }