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(); }
public PizzaMan(PizzaOven pizzaOven, IPizzaHandler handler) { PizzaHandler = handler; PizzaOven = pizzaOven; PizzaOven.AddObserver(this); }