Exemple #1
0
 public void ResetSearch()
 {
     lock (_searcherLock)
     {
         _searcher = null;
     }
 }
Exemple #2
0
 private BoyerMooreStringSearch GetSearcher(string sample)
 {
     lock (_searcherLock)
     {
         if (_searcher == null || _searcher.Sample != sample)
         {
             _searcher = new BoyerMooreStringSearch(sample);
         }
         return(_searcher);
     }
 }
Exemple #3
0
        private TextOccurences SearchOccurrencesInText(string text, string value, int searchStart, int searchEnd)
        {
            BoyerMooreStringSearch searcher = GetSearcher(value);

            return(searcher.SearchOccurrencesInText(text, searchStart, searchEnd));
        }