예제 #1
0
 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]);
     }
 }
예제 #2
0
 public Apple(DrinkBase drink) : base(drink)
 {
     ItemName  = "Apple";
     ItemPrice = 2;
 }
예제 #3
0
 public SmallSize(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+small size";
 }
예제 #4
0
 public BigSize(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+big size";
 }
예제 #5
0
 static void PrintDrink(DrinkBase drinkBase)
 {
     Console.WriteLine($"Drink:{drinkBase.GetDescription()} Price:{drinkBase.GetCost()}");
 }
예제 #6
0
 public Peach(DrinkBase drink) : base(drink)
 {
     ItemName  = "Peach";
     ItemPrice = 4;
 }
 public MilkIngredient(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+milk";
 }
예제 #8
0
 public SugarIngredient(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+sugar";
 }
예제 #9
0
 IOrderBuildContext IOrderBuildContext.WithDrink(DrinkBase drink)
 {
     Drink = drink;
     return(this);
 }
예제 #10
0
 public Pudding(DrinkBase drink) : base(drink)
 {
     ItemName  = "Pudding";
     ItemPrice = 4;
 }
 public ChocolateIngredient(DrinkBase drinkBase)
 {
     _drinkBase  = drinkBase;
     description = _drinkBase.GetDescription() + "+chocolate";
 }
예제 #12
0
 protected Topping(DrinkBase drink)
 {
     Drink = drink;
 }
예제 #13
0
 IOrderBuildContext IOrderBuildContext.WithDrink(DrinkBase drink)
 {
     Drink = drink;
     return this;
 }
예제 #14
0
 public Pearl(DrinkBase drink) : base(drink)
 {
     ItemName  = "Pearl";
     ItemPrice = 3;
 }