static void Main(string[] args) { NYPizzaFactory factory = new NYPizzaFactory(); NYPizzaStore store = new NYPizzaStore(factory); store.OrderPizza("cheese"); }
static void Main(string[] args) { PizzaFactory factory = new NYPizzaFactory(); factory.PreparePizza(PizzaType.Clam); factory = new ChicagoPizzaFactory(); factory.PreparePizza(PizzaType.Salami); }
static void Main(string[] args) { PizzaStore nyStore = new NYPizzaFactory(); nyStore.OrderPizza("cheese"); PizzaStore chicagoFactory = new ChicagoPizzaFactory(); chicagoFactory.OrderPizza("cheese"); Console.ReadLine(); }
static void Main(string[] args) { IPizzaFactory pizzaFactory = new NYPizzaFactory(); PizzaStore pizzaStore = new PizzaStore(pizzaFactory); pizzaStore.OrderPizza(PizzaType.Sausage); Console.WriteLine("\n"); pizzaFactory = new ChicagoPizzaFactory(); pizzaStore = new PizzaStore(pizzaFactory); pizzaStore.OrderPizza(PizzaType.Olives); Console.ReadKey(); }
public NYPizzaStore(NYPizzaFactory nyPizzaFactory) { simplePizzaFacotry = nyPizzaFactory; }