public IEnumerable <City> Find(string find, StringComparison stringComparison = StringComparison.OrdinalIgnoreCase) { var normalizedFind = SuffixDict <City> .NormalizeString(find); var x = _suffixdict.Find(normalizedFind).ToArray(); foreach (var city in _suffixdict.Find(normalizedFind).Where(v => v.Name.IndexOf(normalizedFind, stringComparison) >= 0)) { yield return(city); } }
public IEnumerable <City> Find(string find, StringComparison stringComparison = StringComparison.OrdinalIgnoreCase) { foreach (var city in _suffixdict.Find(find).Where(v => v.Name.IndexOf(find, _comparer) >= 0)) { yield return(city); } }