/// <summary> /// This will never return null. It will throw an exception for a null or blank searchTerm. /// </summary> public NonNullImmutableList <WeightedEntry <TKey> > GetMatches(string searchTerm) { if (string.IsNullOrWhiteSpace(searchTerm)) { throw new ArgumentException("Null/blank searchTerm specified"); } var processedQuerySegment = (new BreakPointCharacterAnalyser()).Process( new StringNavigator(searchTerm) ); return(_queryTranslator.GetMatches( processedQuerySegment.QuerySegment )); }