01 2007 档案

摘要:在项目中可能遇到这样的情况,我们要收集项目中的所有信息,而每种信息的收集方法是不一样的,我就遇到了这样的情况。起初我用的是直接收集合并,在二个时就已经很费力了,这次是把所有的信息(有11处之多)收集起来。我想到了策略模式的意图,把策略选择逻辑和策略执行逻辑分开。所以我就把4种选择方法分别做成了四种策略,每种策略的取分数方法做为策略的执行内容。于是上面的类图就出现了。通过应用策略模式我们把一个复杂... 阅读全文
posted @ 2007-01-25 10:25 南守拥 阅读(253) 评论(0) 推荐(0)
摘要:照着上面的例子做了,怎么不能用啊。错误如下: 错误Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1NHibernate.MappingException: Could not compile the mapping document: QuickSt... 阅读全文
posted @ 2007-01-18 16:46 南守拥 阅读(629) 评论(0) 推荐(0)
摘要:ElementCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.Vi... 阅读全文
posted @ 2007-01-17 13:41 南守拥 阅读(512) 评论(0) 推荐(0)
摘要:AggregateCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.... 阅读全文
posted @ 2007-01-17 11:57 南守拥 阅读(502) 评论(1) 推荐(0)
摘要:ISimpleWriterCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.N... 阅读全文
posted @ 2007-01-15 16:06 南守拥 阅读(357) 评论(2) 推荐(0)
摘要:CommandCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.In... 阅读全文
posted @ 2007-01-12 18:25 南守拥 阅读(229) 评论(1) 推荐(0)
摘要:菜单命令 ShowCommandCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4using System.W... 阅读全文
posted @ 2007-01-12 10:42 南守拥 阅读(258) 评论(0) 推荐(0)
摘要:产品类Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace Gof.Test.Strate... 阅读全文
posted @ 2007-01-11 15:58 南守拥 阅读(354) 评论(0) 推荐(0)
摘要:语境: DoorCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2 3namespace Gof.Test.State 4{ 5 public delegate void ChangeHandler(Do... 阅读全文
posted @ 2007-01-10 17:10 南守拥 阅读(278) 评论(0) 推荐(0)
摘要:一个经典实例 - 排序 自定义类Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2 3namespace Gof.Test.TemplateMethod 4{ 5 public class User 6 {... 阅读全文
posted @ 2007-01-10 13:13 南守拥 阅读(242) 评论(1) 推荐(0)
摘要:UICode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Drawing; 3using System.IO; 4using System.Reflection; 5using Syste... 阅读全文
posted @ 2007-01-10 11:27 南守拥 阅读(382) 评论(1) 推荐(0)
摘要:GirlFactoryCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1using System;23namespace Gof.Test.AbstractFactory4{5 public abstract class GirlFactory ... 阅读全文
posted @ 2007-01-09 10:29 南守拥 阅读(248) 评论(1) 推荐(0)
摘要:需要的JavaScriptCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 Div设置Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHi... 阅读全文
posted @ 2007-01-08 20:16 南守拥 阅读(757) 评论(1) 推荐(0)
摘要:客户代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using Gof.Test.Factory.Machines; 3 4namespace Gof.Test.Factory.Plan 5{ 6 pub... 阅读全文
posted @ 2007-01-08 15:45 南守拥 阅读(370) 评论(0) 推荐(0)
摘要:IChemicalCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2 3namespace Gof.Test.Flyweight 4{ 5 public interface IChemical 6 { 7 ... 阅读全文
posted @ 2007-01-08 12:40 南守拥 阅读(271) 评论(1) 推荐(0)
摘要:客户代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1 Console.WriteLine( root.Responsible.Name );2 Console.WriteLine( leafonelef... 阅读全文
posted @ 2007-01-08 12:34 南守拥 阅读(257) 评论(0) 推荐(0)
摘要:自定义代理类Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Data; 3 4namespace DataLayer 5{ 6 /**//// 7 /// This... 阅读全文
posted @ 2007-01-05 22:53 南守拥 阅读(367) 评论(1) 推荐(0)
摘要:Machine类(可以包含容器)Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2 3namespace Gof.Test.Mediator 4{ 5 public class Machine 6 { 7 ... 阅读全文
posted @ 2007-01-05 17:21 南守拥 阅读(349) 评论(0) 推荐(0)
摘要:操作上的抽象Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1using System;23namespace Gof.Test.Bridge4{5 public interface ITankAction6 {7 strin... 阅读全文
posted @ 2007-01-05 14:09 南守拥 阅读(455) 评论(1) 推荐(0)
摘要:MyFileCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2 3namespace Gof.Test.Composite 4{ 5 public class MyFile:FolderAbstract 6 ... 阅读全文
posted @ 2007-01-04 22:27 南守拥 阅读(349) 评论(1) 推荐(0)
摘要:外观模式封装系统的复杂性来提高程序的可用性,我们经常用的是数据访问外观类,它隔离了Ado.net的复杂性。 简单的外观例子Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1using System; 2using System.Data; 3usin... 阅读全文
posted @ 2007-01-04 17:59 南守拥 阅读(358) 评论(0) 推荐(0)
摘要:类适配器: 客户程序定义好的接口Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1using System;23namespace Gof.Test.adapter4{5 public interface ICart6 {7 ... 阅读全文
posted @ 2007-01-04 17:26 南守拥 阅读(300) 评论(1) 推荐(0)