Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            ConcreateComponet c=new ConcreateComponet();
            ConcreateDecoratorA d1 = new ConcreateDecoratorA();
            ConcreateDecoratorB d2 = new ConcreateDecoratorB();

            d1.SetDecorator(c);
            d2.SetDecorator(d1);

            d2.Operation();

            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            ConcreateComponet   c  = new ConcreateComponet();
            ConcreateDecoratorA d1 = new ConcreateDecoratorA();
            ConcreateDecoratorB d2 = new ConcreateDecoratorB();

            d1.SetDecorator(c);
            d2.SetDecorator(d1);

            d2.Operation();

            Console.ReadKey();
        }