Пример #1
0
 private bool QuotesInQuery(SearchCriteria searchCriteria)
 {
     var simple = searchCriteria as SimpleSearchCriteria;
     if (simple != null)
     {
         return simple.SearchTerms.Any(t => t.Contains("\""));
     }
     else
     {
         return false;
     }
 }
Пример #2
0
 private List<CodeSearchResult> RerunQueryWithWildcardAtTheEnd(SearchCriteria searchCriteria, List<CodeSearchResult> searchResults)
 {
     var simple = searchCriteria as SimpleSearchCriteria;
     if (simple != null)
     {
         var terms = simple.SearchTerms;
         if (terms.Count == 1)
         {
             var term = simple.SearchTerms.First();
             simple.SearchTerms.Clear();
             simple.SearchTerms.Add(term + "*");
             searchResults = _simpleSearcher.Search(simple).ToList();
         }
     }
     return searchResults;
 }