public DrinkInfo(JsonNode json) { this.menuDrinkId = json["menu_drink_id"].Get <int>(); this.language = (SessionManager.Language)json["language"].Get <int>(); json = json["drink"]; this.minDegree = json["min_degree"].Get <int>(); this.maxDegree = json["max_degree"].Get <int>(); this.imageUrl = json["image_url"].Get <string>(); this.shopUrl = json["shop_url"].Get <string>(); this.primaryName = json["primary_name"].Get <string>(); this.names = new string[json["names"].Count]; for (int i = 0; i < this.names.Length; i++) { this.names[i] = json["names"][i].Get <string>(); } this.taste = json["taste"].Get <string>(); this.description = json["description"].Get <string>(); this.recipe = json["recipe"].Get <string>(); this.color = json["color"].Get <string>(); this.location = json["location"].Get <string>(); this.company = json["company"].Get <string>(); this.technique = new Technique(json["technique"]); this.glass = new Glass(json["grass"]); this.drinkBase = new DrinkBase(json["base"]); this.category = new Category(json["category"]); this.source = new Source(json["source"]); this.compornents = new Compornent[json["compornents"].Count]; for (int i = 0; i < this.compornents.Length; i++) { this.compornents[i] = new Compornent(json["compornents"][i]); } }
public Apple(DrinkBase drink) : base(drink) { ItemName = "Apple"; ItemPrice = 2; }
public SmallSize(DrinkBase drinkBase) { _drinkBase = drinkBase; description = _drinkBase.GetDescription() + "+small size"; }
public BigSize(DrinkBase drinkBase) { _drinkBase = drinkBase; description = _drinkBase.GetDescription() + "+big size"; }
static void PrintDrink(DrinkBase drinkBase) { Console.WriteLine($"Drink:{drinkBase.GetDescription()} Price:{drinkBase.GetCost()}"); }
public Peach(DrinkBase drink) : base(drink) { ItemName = "Peach"; ItemPrice = 4; }
public MilkIngredient(DrinkBase drinkBase) { _drinkBase = drinkBase; description = _drinkBase.GetDescription() + "+milk"; }
public SugarIngredient(DrinkBase drinkBase) { _drinkBase = drinkBase; description = _drinkBase.GetDescription() + "+sugar"; }
IOrderBuildContext IOrderBuildContext.WithDrink(DrinkBase drink) { Drink = drink; return(this); }
public Pudding(DrinkBase drink) : base(drink) { ItemName = "Pudding"; ItemPrice = 4; }
public ChocolateIngredient(DrinkBase drinkBase) { _drinkBase = drinkBase; description = _drinkBase.GetDescription() + "+chocolate"; }
protected Topping(DrinkBase drink) { Drink = drink; }
IOrderBuildContext IOrderBuildContext.WithDrink(DrinkBase drink) { Drink = drink; return this; }
public Pearl(DrinkBase drink) : base(drink) { ItemName = "Pearl"; ItemPrice = 3; }