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

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