上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 60 下一页
代码实现如下,注意几点: 1.Decorator中的Operation()方法是对被修饰对象ConcreteComponent中方法Operation()的封装 2.ConcreteDecorator中的Operation()方法是对其父类Operation()方法的封装,同时加入一些额外的新方法 3.ConcreteDecorator中的构造函数负责将修饰与被修饰对象链接在一起,如下图: ... Read More
posted @ 2007-10-02 21:21 包建强 Views(679) Comments(0) Diggs(0)
1.IHttpHandler接口 定义了实现一个HttpRequest的处理所必须实现的一些系统约定方法。 public interface IHttpHandler { //其他Request是否可以使用IHttpHandler bool IsReusable { get; } //处理HttpRequest ... Read More
posted @ 2007-10-02 14:40 包建强 Views(2202) Comments(0) Diggs(0)
1.ASP时代的HTTP请求处理过程 在IIS的应用程序映射中,IIS会将对asp和asa文件的请求转交给asp.dll这个ISAPI来处理 Inetinfo.exe进程,即www服务进程 解释型处理,每次请求都会重新解释一次,不适用于大流量请求 2.ASP.NET的HTTP请求处理过程 3.在HttpRuntime中请求处理过程 HttpRequest请求: 进入HttpRumtim... Read More
posted @ 2007-10-02 11:19 包建强 Views(6804) Comments(9) Diggs(2)
事实上,JIT编译器分成两种(经济编译器和普通编译器),而且它们生来也不是平等的。经济JIT编译器代表了运行一个.NET应用程序所需要的最少功能,它直接用对等的本机代码取代每一条MSIL指令,不进行任何优化从而也带来更少的系统负载。这也意味着它主要应用在内存等资源比较紧张的平台上。 另一方面,普通JIT编译器则是缺省的运行时配置,它会对其产生的代码进行即时优化。这样做无形中给予了... Read More
posted @ 2007-10-02 10:55 包建强 Views(2003) Comments(2) Diggs(0)
反射工厂是.NET独有的,因为它基于反射机制,可以用来简化工厂类。 public static object CreateByReflection(string strType) { Type t = Type.GetType(strType); ConstructorInfo ci = t.GetConstructo... Read More
posted @ 2007-10-02 00:22 包建强 Views(678) Comments(0) Diggs(0)
这个模式是对简单工厂的更高层次上的抽象,UML图如下: public abstract class AbstractFactory { public abstract AbstractProductA CreateProductA(); public abstract AbstractProductB CreateProductB(); ... Read More
posted @ 2007-10-02 00:21 包建强 Views(814) Comments(1) Diggs(0)
工厂方法模式,就是使一个类的实例化延迟到子类——惰性声明 UML图如下: public class Production { } public abstract class Creator { public abstract Production FactoryMathod(); } public class ConcreteCrea... Read More
posted @ 2007-10-02 00:20 包建强 Views(1372) Comments(3) Diggs(0)
11.1 字符 Char,16位Unicode代码值 两个常量字段,Char.MinValue:定义为'\0';Char.MaxValue:定义为'\uffff'; Char.GetUnicodeCategory()方法,返回字符类型(货币/标点/数学符号等等) Char与Int32的相互转型: 11.2 字符串... Read More
posted @ 2007-10-01 18:57 包建强 Views(1071) Comments(0) Diggs(0)
是时候研究IL方面的程序了,太多这方面的技术点需要总结。准备写一个系列,关于IL的全部。 先总结一下,看完老瓦的Video后的一些心得笔记: Opcode指令集 IL代码: 1.directive声明,以.开头 2.instruction声明,不以.开头 3.entrypoint 程序入口 4.ansi,与非托管代码交互式,标记字符集 5.auto,自... Read More
posted @ 2007-10-01 14:28 包建强 Views(726) Comments(0) Diggs(0)
1.Protected internal(意思是protected或者internal),在成员声明是同时选择protected和internal两个修饰符.protected internal的意思是"只有本程序内或者继承于该类的类型可以访问" 2.Namespaces隐式地具有共有访问级别.在声明Namespaces的时候不允许用访问级别修饰符. 3.在编译单元或者Namespaces声明... Read More
posted @ 2007-09-29 00:20 包建强 Views(528) Comments(0) Diggs(0)
上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 60 下一页