commandpattern:解读设计模式----命令模式(Command Pattern)来源: 发布时间:星期五, 2009年1月9日 浏览:2次 评论:0
本文和作者原文有
![]() ![]() ![]() ![]() 原文连接http://www.dofactory.com/Patterns/PatternCommand.aspx 命令模式意图: GOF 在 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 命令模式UML图: ![]() 15 16 public void ExecuteCommand ![]() 17 { 18 command.Execute ![]() 19 } 20 } 21} 22 Receiver 1using 运行结果: Called Receiver.Action![]() 在众多 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 注意: 如果比较类图结构,我门会发现Command模式、Strategy模式、State模式是完全 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 0
相关文章
读者评论
发表评论 |