随笔分类 -  设计模式

摘要:这篇写完,这本书就结束了。以后就只看这个文章了就不用再看那本书了o(^▽^)o大话设计模式(一)简单工厂模式 策略模式 单一职责原则 开放-封闭原则 依赖倒置原则 装饰模式大话设计模式(二)代理模式 工厂方法模式 原型模式 模板方法模式 迪米特法模式 外观模式大话设计模式(三)建造者模式 观察者模式... 阅读全文
posted @ 2014-02-10 09:56 无名の辈 阅读(371) 评论(0) 推荐(0)
摘要:分公司=一部门——组合模式组合模式(Composite),将对象组合成树形结构以表示‘部分-整体’的层次结构。组合模式使得用户对耽搁对象和组合对象的使用具有一致性。using System;using System.Collections.Generic;using System.Linq;usin... 阅读全文
posted @ 2014-02-10 09:55 无名の辈 阅读(335) 评论(0) 推荐(0)
摘要:建造者模式建造者模式(Builder):将一个复杂对象的构建与他的表示分离,使得同样的构建过程可以创建不同的表示。建造者模式的一个实例代码:using System;using System.Collections.Generic;using System.Drawing;using System.... 阅读全文
posted @ 2014-02-10 09:54 无名の辈 阅读(501) 评论(0) 推荐(0)
摘要:代理模式using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Proxy{ class Program ... 阅读全文
posted @ 2014-02-10 09:52 无名の辈 阅读(588) 评论(0) 推荐(0)
摘要:简单工厂模式public class Operation{ private double _numberA=0; private double _numberB=0; public double NumberA { get { ... 阅读全文
posted @ 2014-02-10 09:51 无名の辈 阅读(669) 评论(0) 推荐(0)