예제 #1
0
        static void Main(string[] args)
        {
            House myselfHouse = new MyHouse();
            DecorationStrategy securityHouse = new HouseSecurityDecorator(myselfHouse);
            //securityHouse.Renovation();
            DecorationStrategy securityAndWarmHouse = new AirConditionDecorator(securityHouse);

            securityAndWarmHouse.Renovation();
            Console.WriteLine("Hello World!");
        }
예제 #2
0
        static void Main(string[] args)
        {
            House             myselfHouse   = new PatrickLiuHouse();
            DecoratorStrategy securityHouse = new HouseSecurityDecorator(myselfHouse);

            securityHouse.Renovation();

            DecoratorStrategy securityAndWarmHouse = new KeepWarmDecorator(myselfHouse);

            securityAndWarmHouse.Renovation();

            Console.ReadKey();
        }