Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Component carlson = new Carlson();
            Decorator trousers = new Trousers();
            Decorator propeller = new Propeller();
            Decorator jam = new Jam();

            trousers.Component = carlson;
            jam.Component = trousers;
            propeller.Component = jam;

            
            
            propeller.Operation();

            Console.ReadKey();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Component carlson   = new Carlson();
            Decorator trousers  = new Trousers();
            Decorator propeller = new Propeller();
            Decorator jam       = new Jam();

            trousers.Component  = carlson;
            jam.Component       = trousers;
            propeller.Component = jam;



            propeller.Operation();

            Console.ReadKey();
        }