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

            Console.WriteLine("Preparing Pizza {0}, {1}", dough.Description, sauce.Description);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 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)
 {
 }
Exemplo n.º 8
0
 public SalamiPizza(PizzaIngredientFactory pizzaIngredientFactory)
 {
     _ingredientFactory = pizzaIngredientFactory;
 }
Exemplo n.º 9
0
 public CheesePizza(PizzaIngredientFactory pizzaIngredientFactory)
 {
     _pizzaIngredientFactory = pizzaIngredientFactory;
 }
Exemplo n.º 10
0
        public ChicagoStyleClamPizza(PizzaIngredientFactory ingredientFactory)
        {
            Name = "Chicago Style Clam Pizza";

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