public Dish(string name, List <string> ingredientNames, float price = 0f) { dishDAL = DishFactory.CreateIDishDal(); this.Name = name; this.Price = price; this.Ingredients = new IngredientContainer().FindByNames(ingredientNames); }
public DishContainer(IDishContainerDAL dal = null) { if (dal == null) { this.dishContainerDAL = DishFactory.CreateIDishContainerDal(); } else { dishContainerDAL = dal; } }
/// <summary> /// Creates a new menu and adds it to the current active profile /// </summary> /// <param name="menuType">MenuType to create</param> /// <param name="drinkType">Type of drink to add</param> /// <param name="sideType">Type of menu side to add</param> /// <param name="mainDishType">Type of the main dish</param> /// <param name="sizeType">Size of the dish</param> public void AddProductToProfile(MenuType menuType, DrinkType drinkType, SideType sideType, MainDishType mainDishType, SizeType sizeType) { var menu = new DishFactory( menuType, drinkType, sideType, mainDishType, sizeType) .CreateMenu(); ActiveProfile.AddItem(menu); }
public Dish(string name, float price = 0, IDishDAL dal = null) { if (dal != null) { this.dishDAL = dal; } else { this.dishDAL = DishFactory.CreateIDishDal(); } this.Name = name; this.Price = price; }
public Dish(string name, List <Ingredient> ingredients, float price = 0, IDishDAL dal = null) { if (dal != null) { this.dishDAL = dal; } else { this.dishDAL = DishFactory.CreateIDishDal(); } this.Name = name; this.Price = price; this.Ingredients = ingredients; }
public Order TryParse(string input) { var inputs = input.Split(','); if (!inputs.Any()) { return(null); } var result = new Order(GetOrderType(inputs[0])); for (int i = 1; i < inputs.Length; i++) { result.Dishes.Add(DishFactory.CreateDish(result.OrderType, Convert.ToInt32(inputs[i].Trim()))); } return(result); }
public void SetUp() { _dishFactory = new DishFactory(); }