Пример #1
0
        public Pizzas.Pizza AddType()
        {
            switch (PizzaType)
            {
            case "Margharita":
                Size = new Patterns.Margharita(Size);
                break;

            case "Frutti di Mare":
                Size = new Patterns.FruttidiMare(Size);
                break;

            case "Capricciosa":
                Size = new Patterns.Capricciosa(Size);
                break;

            case "Tuna":
                Size = new Patterns.Tuna(Size);
                break;

            case "Salami":
                Size = new Patterns.Salami(Size);
                break;
            }
            return(Size);
        }
Пример #2
0
 public PatternAdder(string PizzaType, Pizzas.Pizza pizzaSize)
 {
     this.PizzaType = PizzaType;
     this.Size      = pizzaSize;
 }