private static void Main(string[] args) { IHamburguer hamburguer = new Hamburguer(); IHamburguer cheddarDecorator = new CheddarDecorator(hamburguer); IHamburguer baconDecorator = new BaconDecorator(cheddarDecorator); IHamburguer ovosDecorator = new OvosDecorator(baconDecorator); Console.WriteLine(ovosDecorator.BuscarTipoHamburguer()); Console.WriteLine(); }
private static void Main(string[] args) { IPizza pizza = new Pizza(); IPizza queijoDecorator = new QueijoDecorator(pizza); IPizza baconDecorator = new BaconDecorator(queijoDecorator); IPizza cebolaDecorator = new CebolaDecorator(baconDecorator); Console.WriteLine(cebolaDecorator.BuscarTipoPizza()); Console.WriteLine(); }