public WordEntrySet FindEntriesByRootWord(string rootWord) { WordEntrySet result; if (!EntriesByRoot.TryGetValue(rootWord, out result)) { result = WordEntrySet.Empty; } return(result); }
internal WordEntryDetail[] FindEntryDetailsByRootWord(string rootWord) { #if DEBUG if (rootWord == null) { throw new ArgumentNullException(nameof(rootWord)); } #endif return((rootWord == null || !EntriesByRoot.TryGetValue(rootWord, out WordEntryDetail[] details)) ? ArrayEx <WordEntryDetail> .Empty : details); }
internal WordEntryDetail FindFirstEntryDetailByRootWord(string rootWord) { #if DEBUG if (rootWord == null) { throw new ArgumentNullException(nameof(rootWord)); } #endif return(EntriesByRoot.TryGetValue(rootWord, out WordEntryDetail[] details) && details.Length != 0 ? details[0] : null); }