public void CreateIndex(IEnumerable<IngredientSource> datasource) { nameLookup = new Dictionary<Guid, string>(); index = new AlphaTree(); foreach (var ing in datasource) { if (String.IsNullOrWhiteSpace(ing.DisplayName)) continue; ParseString(ing.DisplayName, ing.Id); nameLookup.Add(ing.Id, ing.DisplayName); } }
public void CreateIndex(IEnumerable <IngredientSource> datasource) { nameLookup = new Dictionary <Guid, string>(); index = new AlphaTree(); foreach (var ing in datasource) { if (String.IsNullOrWhiteSpace(ing.DisplayName)) { continue; } ParseString(ing.DisplayName, ing.Id); nameLookup.Add(ing.Id, ing.DisplayName); } }