设计模式之 外观模式
来源:互联网 发布:javascript编写工具 编辑:程序博客网 时间:2024/05/31 18:58
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Ahoo.Demo.DesignPatterns.Facade{ /* ####### 外观模式 ####### * 为子系统的一组接口提供一直的入口 * 该模式定义的高层接口,使子系统更加容易使用 */ public class SystemOne { public void DoMethodOne() { } } public class SystemTwo { public void DoMethodTwo() { } } /// <summary> /// 外观模式 /// </summary> public class Facade { private SystemOne sysOne; private SystemTwo sysTwo; public Facade() { sysOne = new SystemOne(); sysTwo = new SystemTwo(); } public void Do() { sysOne.DoMethodOne(); sysTwo.DoMethodTwo(); } } public class Client { public static void Excute() { Facade facade = new Facade(); facade.Do(); } }}
0 0
- 设计模式之外观
- 设计模式之外观
- 设计模式 之 外观
- 设计模式之外观
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 设计模式之外观模式
- 面向对象设计原则
- 【C#】 学习C# 中的时间函数
- SVN常见问题
- iOS-------------TextKit
- webservice框架jersey简单总结
- 设计模式之 外观模式
- Linux启动新进程的几种方法及比较
- DELETE TRUNCATE
- hive(二)--hive优化
- python提示No module named images的解决方法
- 在Ubuntu14.0.4下安装NS-3.22
- C++中cout如何输出数值的二进制格式?
- 把plist和png大图还原成小图
- Linux进程间通信——使用信号