コード例 #1
0
        public static Utf16FileContents CreateUtf16FileContents(string text)
        {
            var memory   = CreateUtf16Memory(text);
            var contents = new Utf16FileContents(memory, DateTime.Now);

            return(contents);
        }
コード例 #2
0
        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();
        }
コード例 #3
0
 public CompiledTextSearchContainer(string pattern, SearchProviderOptions searchOptions)
 {
     _asciiCompiledTextSearchAlgo = AsciiFileContents.CreateSearchAlgo(pattern, searchOptions);
     _utf16CompiledTextSearchAlgo = Utf16FileContents.CreateSearchAlgo(pattern, searchOptions);
 }