public PerThreadCompiledTextSearchContainer(string pattern, SearchProviderOptions searchOptions)
        {
            _pattern                     = pattern;
            _searchOptions               = searchOptions;
            _asciiAlgorithmFactory       = x => AsciiFileContents.CreateSearchAlgo(_pattern, _searchOptions);
            _utf16CompiledTextSearchAlgo = Utf16FileContents.CreateSearchAlgo(_pattern, _searchOptions);

            // Force execution on the current thread so that we get an exception if
            // the search engine finds "pattern" is invalid.
            this.GetAsciiSearch();
        }
 public CompiledTextSearchContainer(string pattern, SearchProviderOptions searchOptions)
 {
     _asciiCompiledTextSearchAlgo = AsciiFileContents.CreateSearchAlgo(pattern, searchOptions);
     _utf16CompiledTextSearchAlgo = Utf16FileContents.CreateSearchAlgo(pattern, searchOptions);
 }