Exemple #1
0
 public ServiceHandler(PizzaShopVm shopVm)
 {
     ShopVm = shopVm;
     MainOven = new PizzaOven();
     PizzaMan1 = new PizzaMan(MainOven, this);
     PriceStrategy = TimeOfDay.Lunch;
     EveningPriceStrategy = new EveningPriceStrategy();
     LunchPriceStrategy = new LunchPriceStrategy();
     NightPriceStrategy = new NightPriceStrategy();
 }
Exemple #2
0
 public PizzaMan(PizzaOven pizzaOven, IPizzaHandler handler)
 {
     PizzaHandler = handler;
     PizzaOven = pizzaOven;
     PizzaOven.AddObserver(this);
 }