Esempio n. 1
0
 public PizzaToMenuAdapter(IPizzaComponent pizza, string drink, double drinkPrice)
 {
     _food       = pizza.ToString();
     _drink      = drink;
     _drinkPrice = drinkPrice;
     _totalPrice = _pizza.Price + _drinkPrice;
 }
Esempio n. 2
0
 private void preparePizza(IPizzaComponent p)
 {
     Task.Factory.StartNew(() =>
     {
         int preparetime = random.Next(5, 15);
         System.Threading.Thread.Sleep(preparetime * 1000);
         NotifyObservers(p.ToString());
     });
 }
 public override string ToString()
 {
     return(Pizza.ToString() + " and Pepperoni");
 }
Esempio n. 4
0
 public override string ToString()
 {
     return(Pizza.ToString() + " and Chilli");
 }