public ChocolateDeluxe()
        {
            CompatibleToppings = new List <string>();

            _chocolate = new HotChocolate();
            _chocolate.MakeDeluxe();
        }
Exemplo n.º 2
0
 public HotChocolateDeluxeWrapper(HotChocolate choco)
 {
     _hotChocolate = choco;
     _hotChocolate.MakeDeluxe();
     Name      = choco.GetNameOfDrink();
     BasePrice = 1.20;
 }
Exemplo n.º 3
0
 public Chocolate(bool makeDeluxe = false)
 {
     _choco = new HotChocolate();
     if (makeDeluxe)
     {
         _choco.MakeDeluxe();
     }
 }
Exemplo n.º 4
0
        public HotChocolateDecorator(IDrink drink, bool deluxe) : base(drink)
        {
            Drink          = drink;
            chocolatedrink = new HotChocolate();

            if (deluxe)
            {
                chocolatedrink.MakeDeluxe();
            }
        }
Exemplo n.º 5
0
        public HotChocolateAdapter(bool isDeluxe)
        {
            _adaptee = new HotChocolate();

            if (isDeluxe)
            {
                _adaptee.MakeDeluxe();
            }

            Name = _adaptee.GetNameOfDrink();
        }
Exemplo n.º 6
0
        public ChocolateDrinkDecorator(IDrink drink, bool isDeluxe) : base(drink)
        {
            hotChocolate = new HotChocolate();

            if (isDeluxe)
            {
                hotChocolate.MakeDeluxe();
            }

            this.Name  = hotChocolate.GetNameOfDrink();
            this.Price = hotChocolate.Cost();
        }
Exemplo n.º 7
0
 public void MakeDeluxe()
 {
     _hotChocolate.MakeDeluxe();
 }
Exemplo n.º 8
0
 public HotChocolateDeluxeDecorator(IHotChocolateDrinkAdapter drink) : base(drink)
 {
     HotChocolate.MakeDeluxe();
 }