示例#1
0
 /// <summary>
 /// Takes part of an ingredient name and returns possible matches, useful for autocomplete UIs.
 /// </summary>
 /// <param name="query">Part or all of an ingredient name.  Must be at least three characters.</param>
 /// <returns>An enumeration of IngredientNode objects describing possible matches and their IDs.</returns>
 public virtual IEnumerable <IngredientNode> AutocompleteIngredient(string query)
 {
     using (InitLock.ReadLock())
     {
         return(ingParser.MatchIngredient(query));
     }
 }