您的位置:首页 > 其它

《Prism 5.0源码走读》 设计模式

2014-08-11 22:16 387 查看
Prism或Prism构建的应用程序时会使用大量的设计模式,本文简要列举Prism相关的那些设计模式。

Adapter(适配器模式):Prism Library主要在Region和IoC container应用Adapter模式。

ContentControlRegionAdapter.cs

ItemsControlRegionAdapter.cs

SelectorRegionAdapter.cs

UnityServiceLocatorAdapter.cs

MefServiceLocatorAdapter.cs

Application Controller Pattern: 这个我们在应用程序中经常应用于控制View切换和跳转,减少event的数量。

Factory Pattern: Prism里面使用工厂模式来创建Region behavior.

RegionBehaviorFactory.cs

Command Pattern:

Dependency Injection Pattern:

Event Aggregator Pattern:

Facada Pattern:

Inversion of Control Pattern:

Observer Pattern:

Model-View-ViewModel Pattern:

Registry Pattern:

Service Locator Pattern:

Separated Interface and Plug-in

Composite and Composite View

下图是设计模式在Prism结构设计中的应用:



编辑记录:

2014.08.11 初始版本

2014.08.12 加入Factory Pattern
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: