Ejemplo n.º 1
0
        public bool AllowArticle(NewsArticle newsArticle, string searchTerm, KeyValueStorage storage)
        {
            Mapping.Load(storage);
            Dictionary <string, IEnumerable <string> > titleMatcherLookup = Model.GetNextLayerDictionary();

            // TODO: use HashSet as the IEnumerable for better performance
            // then only do the regex in the loop

            return(!StringMatchesSection(newsArticle.Title, titleMatcherLookup, searchTerm) &&
                   !StringMatchesSection(newsArticle.Title, titleMatcherLookup, AnySection));
        }