blob: e86cdaffd8f4690dd471fa71484ee41ccf0557da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using System.Collections.Generic;
using KukaPizza.Models;
namespace KukaPizza.Builders
{
public class PizzaBuilder : IPizzaBuilder
{
PizzaOrder _pizzaOrder = new PizzaOrder();
public void ChooseBase(Pizza pizza)
{
_pizzaOrder.BasePizza = pizza;
}
public void AddExtraToppings(List<Topping> extraToppings)
{
_pizzaOrder.ExtraToppings = extraToppings;
}
public void ChooseSize(PizzaSize size)
{
_pizzaOrder.Size = size;
}
public PizzaOrder GetResult()
{
return _pizzaOrder;
}
}
}
|