Exemple #1
0
 private bool IsSatisfiedByDate(FeedItem item)
 {
     return((DateFrom == null || item.PublishedDate >= DateFrom) &&
            (DateTo == null || item.PublishedDate <= DateTo));
 }
Exemple #2
0
 private bool IsSatisfiedByContentKeyWords(FeedItem item)
 {
     return(!ContentKeyWords.Any() ||
            ContentKeyWords.All(keyWord => item.Title.Contains(keyWord) || item.Description.Contains(keyWord)));
 }
Exemple #3
0
 private bool IsSatisfiedByCategories(FeedItem item)
 {
     return(!Categories.Any() ||
            Categories.All(requiredCategory => item.Categories.Contains(requiredCategory)));
 }
Exemple #4
0
 public bool IsSatisfiedBy(FeedItem item)
 {
     return(IsSatisfiedByContentKeyWords(item) &&
            IsSatisfiedByCategories(item) &&
            IsSatisfiedByDate(item));
 }