HttpTaskAsyncHandler 类

定义

提供方法,派生的任务处理程序类可实施该方法以处理异步任务。Provides methods that a derived task handler class can implement in order to process an asynchronous task.

public ref class HttpTaskAsyncHandler abstract : System::Web::IHttpAsyncHandler
public abstract class HttpTaskAsyncHandler : System.Web.IHttpAsyncHandler
type HttpTaskAsyncHandler = class
    interface IHttpAsyncHandler
    interface IHttpHandler
Public MustInherit Class HttpTaskAsyncHandler
Implements IHttpAsyncHandler
继承
HttpTaskAsyncHandler
实现

注解

HttpTaskAsyncHandler 类提供一种简单的方法来处理异步任务,而无需实现 BeginProcessRequestEndProcessRequest 方法。The HttpTaskAsyncHandler class provides a simplified way to handle asynchronous tasks without having to implement the BeginProcessRequest and EndProcessRequest methods. 若要为异步任务创建处理程序,可以重写 ProcessRequestAsync 方法并实现自定义任务处理代码。To create a handler for an asynchronous task, you can override the ProcessRequestAsync method and implement custom task handling code.

构造函数

HttpTaskAsyncHandler()

从派生类中的构造函数中调用,用于初始化 HttpTaskAsyncHandler 类。Called from constructors in derived classes to initialize the HttpTaskAsyncHandler class.

属性

IsReusable

在派生类中重写时,获取一个值,该值指示任务处理程序类实例是否可重用于另一异步任务。When overridden in a derived class, gets a value that indicates whether the task handler class instance can be reused for another asynchronous task.

方法

Equals(Object)

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

(继承自 Object)
GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
MemberwiseClone()

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

(继承自 Object)
ProcessRequest(HttpContext)

在派生类中重写时,提供处理同步任务的代码。When overridden in a derived class, provides code that handles a synchronous task.

ProcessRequestAsync(HttpContext)

在派生类中重写时,提供处理异步任务的代码。When overridden in a derived class, provides code that handles an asynchronous task.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

显式接口实现

IHttpAsyncHandler.BeginProcessRequest(HttpContext, AsyncCallback, Object)

启动 HTTP 任务处理程序的一项异步处理任务。Initiates asynchronous processing of a task in an HTTP task handler.

IHttpAsyncHandler.EndProcessRequest(IAsyncResult)

结束 HTTP 任务处理程序的一项异步处理任务。Ends asynchronous processing of a task in an HTTP task handler.

适用于