예제 #1
0
        public Pizza OrderPizza(string type)
        {
            Pizza pizza = _factory.CreatePizza(type);

            pizza.Prepare();
            pizza.Bake();
            pizza.Cut();
            pizza.Box();

            return(pizza);
        }
예제 #2
0
        public Pizza OrderPizza(PizzaTypes type)
        {
            Pizza pizza = CreatePizza(type);

            pizza.Prepare();
            pizza.Bake();
            pizza.Cut();
            pizza.Box();

            return(pizza);
        }
예제 #3
0
        public Pizza OrderPizza(string type)
        {
            Pizza pizza = null;

            pizza = CreatePizza(type);

            pizza.Prepare();
            pizza.Back();
            pizza.Cut();
            pizza.Box();
            return(pizza);
        }
예제 #4
0
        static void Main(string[] args)
        {
            NYPizzaStore pizzaStore = new NYPizzaStore();
            Pizza        pizza      = pizzaStore.CreatePizza("cheese");

            pizza.Prepare();
            pizza.Bake();
            pizza.Cut();
            pizza.Box();

            Console.WriteLine(pizza.ToString());

            Console.ReadKey();
        }