命令模式(Command)

作者:追风剑情 发布于:2016-6-17 18:05 分类:设计模式

应用场景:将行为请求者与行为执行者解耦。 using System; using System.Collections.Generic; using System.Text; namespace CommandTest { class Program { static void Main(string[] args) ...

阅读全文>>

标签: 设计模式

评论(0) 浏览(4398)

抽象工厂模式(Abstract Factory)

作者:追风剑情 发布于:2016-6-17 17:41 分类:设计模式

应用场景:创建产品簇 using System; using System.Collections.Generic; using System.Text; namespace FactoryTest { class Program { static void Main(string[] args) { ...

阅读全文>>

标签: 设计模式

评论(0) 浏览(4138)

工厂方法模式(Factory Method)

作者:追风剑情 发布于:2016-6-17 17:12 分类:设计模式

应用场景:产品的组装比较复杂。用工厂模式外部可以不关心生产过程以及产品相关的部件对象。 using System; using System.Collections.Generic; using System.Text; namespace FactoryTest { class Program { static void Main(st...

阅读全文>>

标签: 设计模式

评论(0) 浏览(3922)

生成器模式(Builder)

作者:追风剑情 发布于:2016-6-17 15:50 分类:设计模式

应用场景:产品对象的构造比较复杂时使用。 using System; using System.Collections.Generic; using System.Text; namespace BuilderTest { class Program { static void Main(string[] args) {...

阅读全文>>

标签: 设计模式

评论(0) 浏览(4277)

原型模式(Prototype)

作者:追风剑情 发布于:2016-6-15 14:09 分类:设计模式

using System; using System.Collections.Generic; using System.Text; namespace PrototypeTest { class Program { static void Main(string[] args) { ConcretePr...

阅读全文>>

标签: 设计模式

评论(0) 浏览(4269)

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号