예제 #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();
        }
예제 #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();
        }