public void SaveMatchCirterion(RssFeedMatchCriterion criterion)
        {
            using (var ctx = new RssContext())
            {
                AddOrUpdate(criterion, ctx);

                ctx.SaveChanges();
            }
        }
Example #2
0
 private bool FieldMatches(string fieldValue, RssFeedMatchCriterion matchCriterion)
 {
     return(fieldValue?.IndexOf(matchCriterion.ExactContains, StringComparison.InvariantCultureIgnoreCase) >= 0);
 }
Example #3
0
 private bool PostMatches(RssPost post, RssFeedMatchCriterion matchCriterion)
 {
     return(FieldMatches(post.Content, matchCriterion) || FieldMatches(post.Title, matchCriterion) ||
            FieldMatches(post.Description, matchCriterion));
 }