Ejemplo n.º 1
0
        public string ContextFor(JournalPage journalPage, JournalSearch journalSearch)
        {
            var searchTerms = journalSearch.SearchTerms;

            if (!searchTerms.Any())
            {
                return(string.Empty);
            }

            if (journalSearch.MatchWholePhrase)
            {
                return(findContextFor(journalPage, journalSearch.Search, journalSearch.MatchCase));
            }

            return(multipleLinesContext(searchTerms.Select(term => findContextFor(journalPage, term, journalSearch.MatchCase))
                                        .Where(conxtext => !string.IsNullOrEmpty(conxtext))));
        }
Ejemplo n.º 2
0
 public JournalSearchPerformedEvent(IEnumerable <JournalSearchItem> searchResults, JournalSearch journalSearch)
 {
     SearchResults = searchResults;
     JournalSearch = journalSearch;
 }
Ejemplo n.º 3
0
 public ShowJournalSearchEvent(JournalSearch journalSearch)
 {
     JournalSearch = journalSearch;
 }