public ScreenMenuCategory AddCategory(string categoryName) { var result = new ScreenMenuCategory(categoryName); Categories.Add(result); return(result); }
public void AddItemsToCategory(string category, List <MenuItem> menuItems) { ScreenMenuCategory menuCategory = Categories.Single(x => x.Name == category); Debug.Assert(menuCategory != null); foreach (var menuItem in menuItems) { menuCategory.AddMenuItem(menuItem); } }