随笔分类 - Design Pattern
摘要:The following article is mainly from Prism documentation, it's just a review of IoC.Having class depends on services or components whose concrete type is specified at the design time introduced severa...
阅读全文
摘要:实箭头: 虚线:Dependence,表示一种比较弱的依赖关系,某个类在某一段时间可能使用另一个类。 实线:表示两个对象间的关系,根据对象间有无主从(Owner)关系,可有分为两类 无主从关系: Association, 两个对象的创建和销毁都彼此独立 有主从关系, 既一个对象被创建后只能属于创建它的对象,不能同时被别的对象使用。根据两个对象的生命周期的依赖关系又可分为两类: ...
阅读全文
摘要:简单写的一个Factory Method, 利用反射简化工厂逻辑,在添加/删除产品后不需要更新工厂.[代码]
阅读全文