随笔分类 -  设计模式

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;/* 装饰模式 * * 定义接口或类(类或抽象类) * 分类实现 * 如多种对象类 A 或 B * 使用继承实现B类多样代处理和自己的处 阅读全文
posted @ 2016-08-28 15:28 悟道007 阅读(168) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 组合模式 * * 树型节点管理 */namespace App_MYCS.HDL_SJMS.ZHMS{ class my_ZHM 阅读全文
posted @ 2016-08-28 15:28 悟道007 阅读(155) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 桥接模式 * 把抽象部分与它的实现部分分离 变得可以独立变化 * 多用聚合,少用继承 合成 聚合 * 合成是指一个整体 一个对象 阅读全文
posted @ 2016-08-28 15:27 悟道007 阅读(170) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 为方便统一接口。通过适配器来转换调用 */namespace App_MYCS.HDL_SJMS.SPCMS{ class my 阅读全文
posted @ 2016-08-28 15:27 悟道007 阅读(98) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 外观模式 */namespace App_MYCS.HDL_SJMS.WGMS{ class myclass_WGMS { pu 阅读全文
posted @ 2016-08-28 15:27 悟道007 阅读(121) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 职责链模式 * * * 好处是把任务分化了,并让各个执行只管处理自己的部分,处理不能转交下一个处理进行处理 * 不好是可能到最后 阅读全文
posted @ 2016-08-28 15:26 悟道007 阅读(131) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 中介者模式 * * 集中控制 * 所有的操作都通过中介进行转发处理 */ namespace App_MYCS.HDL_SJMS 阅读全文
posted @ 2016-08-28 15:25 悟道007 阅读(138) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* */ namespace App_MYCS.HDL_SJMS.ZTMS{ class my_ZTMS { public void 阅读全文
posted @ 2016-08-28 15:25 悟道007 阅读(140) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 模板方法模式 */ namespace App_MYCS.HDL_SJMS.MBFFMS{ class my_MBFFMS { 阅读全文
posted @ 2016-08-28 15:24 悟道007 阅读(128) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 命令模式 * * 可以对操作相关命令处理进行过滤和取消回退的操作 * (让命令和操作分开来) */ namespace App_ 阅读全文
posted @ 2016-08-28 15:24 悟道007 阅读(144) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Collections;/* 享元模式 * (共享单元) * 有太多的相同 阅读全文
posted @ 2016-08-28 15:23 悟道007 阅读(117) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* * * 如同数据转换 文本解释等 可用于协议等的接收数据处理解释 */ namespace App_MYCS.HDL_SJMS. 阅读全文
posted @ 2016-08-28 15:23 悟道007 阅读(157) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 访问者模式 */ namespace App_MYCS.HDL_SJMS.FWZMS{ class my_FWZMS { pub 阅读全文
posted @ 2016-08-28 15:22 悟道007 阅读(113) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 观察者模式 * 当一个对象的改变需要同时改变其它对象时 * 不知具体会同时改变多少个对象时 * */namespace App_ 阅读全文
posted @ 2016-08-28 15:22 悟道007 阅读(140) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 代理模式 */namespace App_MYCS.HDL_SJMS.DLMS{ class my_DLMS { public 阅读全文
posted @ 2016-08-28 15:21 悟道007
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 策略模式 */ namespace App_MYCS.HDL_SJMS.CLMS{ //调用 public class my_c 阅读全文
posted @ 2016-08-28 15:20 悟道007 阅读(144) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* */ namespace App_MYCS.HDL_SJMS.DDQMS{ class my_DDQMS { public vo 阅读全文
posted @ 2016-08-28 15:20 悟道007 阅读(359) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 备忘录模式 */ namespace App_MYCS.HDL_SJMS.BWLMS{ class my_BWLMS { pub 阅读全文
posted @ 2016-08-28 15:19 悟道007 阅读(172) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO; /* */ namespace App_MYCS.HDL_SJMS.JZZMS{ class my_J 阅读全文
posted @ 2016-08-28 15:18 悟道007 阅读(126) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text; /* 原型模式 */ namespace App_MYCS.HDL_SJMS.YXMS{ class my_YXMS { public 阅读全文
posted @ 2016-08-28 15:18 悟道007 阅读(127) 评论(0) 推荐(0)