摘要: 命令模式:将请求封装为对象,使得客户可以将不同的请求当做参数使用,同时可以支持Undo操作。示例代码:usingSystem;usingSystem.Text;usingSystem.IO;namespaceHello{//Interface CommandpublicinterfaceCommand{voidExecute();voidUndo();}//No CommandpublicclassNoCommand:Command{publicvoidExecute(){}publicvoidUndo(){}}//Light ClasspublicclassLight{publicvoidO 阅读全文
posted @ 2011-10-01 13:42 Erebus_NET 阅读(199) 评论(0) 推荐(0) 编辑