private void PizzaStore_Load(object sender, EventArgs e) { SimplePizzaFactory pizzaFactory = new SimplePizzaFactory(); _pizzaStore = new PizzaStoreClass(pizzaFactory); foreach (PizzaType pizza in (PizzaType[])Enum.GetValues(typeof(PizzaType))) { ListBoxPizza.Items.Add(pizza.ToString()); } }
public PizzaStore(SimplePizzaFactory pf) { factory = pf; }
public PizzaStore(SimplePizzaFactory factory) { _factory = factory; }
static void Main(string[] args) { SimplePizzaFactory factory = new SimplePizzaFactory(); PizzaStore pizzaStore = new PizzaStore(factory); Pizza pizza = pizzaStore.OrderPizza("cheese"); }
public PizzaStore(SimplePizzaFactory factory) { this.factory = factory; }