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