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!"); }
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(); }