public override void Prepare()
        {
            IDough dough = PizzaIngredientFactory.CreateDough();
            ISauce sauce = PizzaIngredientFactory.CreateSauce();

            Console.WriteLine("Preparing Pizza {0}, {1}", dough.Description, sauce.Description);
        }
示例#2
0
        public static Pizza ConvertPizzaModel(PizzaModel model)
        {
            List <Pizza_Ingredient> pizzaIngredient = new List <Pizza_Ingredient>();
            Bottom bottom = new Bottom();

            if (model == null)
            {
                return(null);
            }

            if (model.PizzaIngredients != null)
            {
                pizzaIngredient = PizzaIngredientFactory.ConvertPizzaIngredientModels(model.PizzaIngredients);
            }

            if (model.Bottom != null)
            {
                bottom = BottomFactory.ConvertBottom(model.Bottom);
            }

            Pizza pizza = new Pizza
            {
                Id              = model.Id,
                Name            = model.Name,
                BottomId        = bottom.Id,
                Price           = model.Price,
                OrderRuleId     = model.OrderRuleId,
                PizzaIngredient = pizzaIngredient
            };

            return(pizza);
        }
示例#3
0
        public static PizzaModel AssignIngredients(PizzaModel model, List <IngredientModel> ingredients)
        {
            UnitOfWorkRepository unitOfWork = new UnitOfWorkRepository();

            foreach (var ing in ingredients)
            {
                PizzaIngredientModel pizIng = new PizzaIngredientModel
                {
                    Id         = new Guid(),
                    Ingredient = ing,
                    PizzaId    = model.Id
                };
                unitOfWork.PizzaIngredientRepository.AddPizza_Ingredients(PizzaIngredientFactory.ConvertPizzaIngredientModel(pizIng));
                model.PizzaIngredients.Add(pizIng);
            }
            unitOfWork.PizzaRepository.UpdatePizza(PizzaFactory.ConvertPizzaModel(model));
            return(model);
        }
 public CCCheesePizzz(PizzaIngredientFactory fac, IPizzaCutting cut) : base("CCCheesePizzz", fac, cut)
 {
 }
 public NYStyleVeggiePizza(PizzaIngredientFactory ingredientFactory)
 {
     this.ingredientFactory = ingredientFactory;
 }
 public CheesePizza(PizzaIngredientFactory factory)
 {
     _ingredientFactory = factory;
 }
 public CheesePizza(PizzaIngredientFactory ingredientFactory)
     : base(ingredientFactory)
 {
 }
 public SalamiPizza(PizzaIngredientFactory pizzaIngredientFactory)
 {
     _ingredientFactory = pizzaIngredientFactory;
 }
示例#9
0
 public CheesePizza(PizzaIngredientFactory pizzaIngredientFactory)
 {
     _pizzaIngredientFactory = pizzaIngredientFactory;
 }
示例#10
0
        public ChicagoStyleClamPizza(PizzaIngredientFactory ingredientFactory)
        {
            Name = "Chicago Style Clam Pizza";

            this.ingredientFactory = ingredientFactory;
        }
 internal VeggiePizza(PizzaIngredientFactory ingredientFactory)
 {
     base.ingredientFactory = ingredientFactory;
 }
示例#12
0
 public ClamPizza(PizzaIngredientFactory ingredientFactory)
 {
     this.ingredientFactory = ingredientFactory;
 }
 internal ClamPizza(PizzaIngredientFactory ingredientFactory)
 {
     base.ingredientFactory = ingredientFactory;
 }
示例#14
0
 public CheesePizza(PizzaIngredientFactory ingredientFactory)
 {
     this.ingredientFactory = ingredientFactory; 
 }
 internal PepperoniPizza(PizzaIngredientFactory ingredientFactory)
 {
     base.ingredientFactory = ingredientFactory;
 }
示例#16
0
 //implementa en el contructor el constructor base de pizza
 public PepperoniPizza(PizzaIngredientFactory ingrediente) : base(ingrediente)
 {
 }
示例#17
0
 public CheesePizza(PizzaIngredientFactory ingredientFactory)
 {
     IngredientFactory = ingredientFactory;
 }
示例#18
0
 public Pizza(string name, PizzaIngredientFactory fac, IPizzaCutting cut)
 {
     m_Name    = name;
     m_Factory = fac;
     m_Cutting = cut;
 }
示例#19
0
 public NYCheesePizza(PizzaIngredientFactory pif) : base(pif)
 {
 }
 public CheesePizza(PizzaIngredientFactory ingredientFactory, IConsole console) : base(console)
 {
     this.ingredientFactory = ingredientFactory;
 }
示例#21
0
 public ClamPizza(PizzaIngredientFactory pizzaIngredientFactory)
 {
     _pizzaIngredientFactory = pizzaIngredientFactory;
 }
示例#22
0
 public PepperoniPizza(PizzaIngredientFactory pizzaIngredient)
 {
     this.pizzaIngredient = pizzaIngredient;
 }
示例#23
0
 public NYStyleCheesePizza(PizzaIngredientFactory ingredientFactory)
 {
     Name = "NY Style Sauce and Cheese Pizza";
     this.ingredientFactory = ingredientFactory;
 }
 public NYStyleCheesePizza(PizzaIngredientFactory ingredientFactory)
 {
     this.ingredientFactory = ingredientFactory;
 }
示例#25
0
 public VeggiePizza(PizzaIngredientFactory ingredientFactory)
 {
     _ingredientFactory = ingredientFactory;
 }
示例#26
0
 public CCStore(PizzaIngredientFactory fac)
 {
     this.IngredientFactory = fac;
 }
示例#27
0
 //implementa en el contructor el constructor base de pizza
 public ClamPizza(PizzaIngredientFactory ingrediente) : base(ingrediente)
 {
 }
 internal CheesePizza(PizzaIngredientFactory ingredientFactory)
 {
     base.ingredientFactory = ingredientFactory;
 }
示例#29
0
 public VeggiePizza(PizzaIngredientFactory pizzaIngredient)
 {
     this.pizzaIngredient = pizzaIngredient;
 }
示例#30
0
 public CheesePizza(PizzaIngredientFactory IngredientFactory)
 {
     this.IngredientFactory = IngredientFactory;
 }
示例#31
0
 public ClamPizza(PizzaIngredientFactory ingredientFactory)
 {
     this.ingredientFactory = ingredientFactory;
 }
示例#32
0
 public ClamPizza(PizzaIngredientFactory factory)
 {
     pizzaIngredientFactory = factory;
 }
示例#33
0
 public PepperoniPizza(PizzaIngredientFactory ingredientFactory)
 {
     this.ingredientFactory = ingredientFactory;
 }
示例#34
0
 public PepperoniPizza(PizzaIngredientFactory factory)
 {
     pizzaIngredientFactory = factory;
 }
 public CCPepperoniPizza(PizzaIngredientFactory fac, IPizzaCutting cut) : base("CCPepperoniPizza", fac, cut)
 {
 }
示例#36
0
 public VeggiePizza(PizzaIngredientFactory factory)
 {
     pizzaIngredientFactory = factory;
 }