Example #1
0
        static void Main(string[] args)
        {
            Component         component         = new ConcreteComponent();
            ConcreteDecorator concreteDecorator = new ConcreteDecorator(component);

            concreteDecorator.Operation();
            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            Component caramel = new ConcreteDecorator(new ConcreteDecorator(new ConcreteDecorator(new ConcreteDecorator(new ConcreteComponent()))));

            Console.WriteLine(caramel.Method());
        }