예제 #1
0
        static void Main(string[] args)
        {
            ConcreteComponent  TextView        = new ConcreteComponent();
            ConcreteDecoratorA ScrollDecorator = new ConcreteDecoratorA();
            ConcreteDecoratorB BorderDecorator = new ConcreteDecoratorB();

            ScrollDecorator.SetComponent(TextView);
            BorderDecorator.SetComponent(ScrollDecorator);
            BorderDecorator.Operation();

            Console.ReadLine();
        }
예제 #2
0
        static void Main(string[] args)
        {
            ConcreteComponent TextView = new ConcreteComponent();
            ConcreteDecoratorA ScrollDecorator = new ConcreteDecoratorA();
            ConcreteDecoratorB BorderDecorator = new ConcreteDecoratorB();

            ScrollDecorator.SetComponent(TextView);
            BorderDecorator.SetComponent(ScrollDecorator);
            BorderDecorator.Operation();

            Console.ReadLine();
        }