2012年2月7日

摘要: 定义:用于为子系统中的接口提供统一的接口。Facade设计模式定义了一个较高级的接口,它使得子系统的使用更加容易。UML:示例:View Code 1 // Facade pattern -- Structural example 2 3 4 using System; 5 6 7 namespace DoFactory.GangOfFour.Facade.Structural 8 9 { 10 11 /// <summary> 12 13 /// MainApp startup class for Structural 14 15 /// ... 阅读全文
posted @ 2012-02-07 16:42 探索、追寻 阅读(235) 评论(0) 推荐(0)
 
摘要: 定义:将一个类的接口转换为另外一个用户所期望的接口。Adapter设计模式允许一些类可以共同运行,这些类因为具有不兼容的接口而不能使用其它的方法。UML:示例:View Code 1 // Adapter pattern -- Structural example 2 3 4 using System; 5 6 7 namespace DoFactory.GangOfFour.Adapter.Structural 8 9 { 10 11 /// <summary> 12 13 /// MainApp startup class for Stru... 阅读全文
posted @ 2012-02-07 16:26 探索、追寻 阅读(183) 评论(0) 推荐(0)