/// ------------------------------------------------------------------------------------ private void AddWords(string words, string pattern) { var entry = new RecordCacheEntry(_prj); entry.NeedsParsing = true; entry.SetValue("Phonetic", words); entry.SetValue("CVPattern", pattern); _dataSource.ParseType = DataSourceParseType.OneToOne; entry.DataSource = _dataSource; _recCache.Add(entry); _recCache.BuildWordCache(null); BuildPhoneSortKeysForTests(); _cache.Clear(); foreach (var wcEntry in _recCache.WordCache) { _cache.Add(wcEntry); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Add records to the m_cache. /// </summary> /// ------------------------------------------------------------------------------------ private void AddWords(string words, string pattern, string gloss) { m_recCache.Clear(); var entry = new RecordCacheEntry(_prj); entry.SetValue(kPhonetic, words); entry.SetValue(kCVPattern, pattern); entry.SetValue(kGloss, gloss); entry.NeedsParsing = true; entry.DataSource = m_dataSource; m_recCache.Add(entry); m_recCache.BuildWordCache(null); m_cache.Clear(); foreach (var wcEntry in m_recCache.WordCache) { m_cache.Add(wcEntry); } }
/// ------------------------------------------------------------------------------------ private void AddWords(string words) { var entry = new RecordCacheEntry(_prj); entry.SetValue("Phonetic", words); entry.NeedsParsing = true; entry.DataSource = _dataSource; _recCache.Add(entry); _recCache.BuildWordCache(null); BuildPhoneSortKeysForTests(); var query = new SearchQuery(); query.IgnoreDiacritics = false; query.IgnoredCharacters = null; query.Pattern = "[V]/*_*"; _cache = App.Search(query); _cache.SearchQuery = query; }