PageHandlerFactory PageHandlerFactory PageHandlerFactory PageHandlerFactory Class

定义

创建从 Page 类继承并实现 IHttpHandler 接口的类的实例。Creates instances of classes that inherit from the Page class and implement the IHttpHandler interface. 实例被动态地创建以处理针对 ASP.NET 文件的请求。Instances are created dynamically to handle requests for ASP.NET files. PageHandlerFactory 类是 ASP.NET 页的默认处理程序工厂实现。The PageHandlerFactory class is the default handler factory implementation for ASP.NET pages.

public ref class PageHandlerFactory
public class PageHandlerFactory
type PageHandlerFactory = class
    interface IHttpHandlerFactory
Public Class PageHandlerFactory
继承
PageHandlerFactoryPageHandlerFactoryPageHandlerFactoryPageHandlerFactory
实现

注解

PageHandlerFactoryIHttpHandlerFactory实现接口,为 ASP.NET 文件提供默认的 HTTP 处理程序。The PageHandlerFactory class implements the IHttpHandlerFactory interface to provide the default HTTP handler for ASP.NET files. PageHandlerFactory有必要,将调用 ASP.NET 编译系统以进行编译,并返回与该 URL 对应的确切类型,然后创建该类型的实例。The PageHandlerFactory calls the ASP.NET compilation system to compile, if necessary, and return the exact type corresponding to the URL, and then creates an instance of that type. 页类型从Page类继承并IHttpHandler实现接口。The page type inherits from the Page class and implements the IHttpHandler interface.

若要生成自定义页面处理程序工厂, IHttpHandlerFactory请在httpHandlers 元素(ASP.NET 设置架构)配置节的应用程序的 web.config 文件中实现并注册自定义PageHandlerFactory类。To build a custom page handler factory, implement the IHttpHandlerFactory and register the custom PageHandlerFactory class in the Web.config file for the application in the httpHandlers Element (ASP.NET Settings Schema) configuration section.

构造函数

PageHandlerFactory() PageHandlerFactory() PageHandlerFactory() PageHandlerFactory()

初始化 PageHandlerFactory 类的新实例。Initializes a new instance of the PageHandlerFactory class.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHandler(HttpContext, String, String, String) GetHandler(HttpContext, String, String, String) GetHandler(HttpContext, String, String, String) GetHandler(HttpContext, String, String, String)

返回 IHttpHandler 接口的实例以处理请求的资源。Returns an instance of the IHttpHandler interface to process the requested resource.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ReleaseHandler(IHttpHandler) ReleaseHandler(IHttpHandler) ReleaseHandler(IHttpHandler) ReleaseHandler(IHttpHandler)

使工厂可以重用现有的处理程序实例。Enables a factory to reuse an existing instance of a handler.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

适用于

另请参阅