HttpContext 构造函数

定义

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

重载

HttpContext(HttpWorkerRequest)

使用指定的辅助请求对象初始化 HttpContext 类的新实例。Initializes a new instance of the HttpContext class that uses the specified worker-request object.

HttpContext(HttpRequest, HttpResponse)

使用指定的请求和响应对象初始化 HttpContext 类的新实例。Initializes a new instance of the HttpContext class by using the specified request and response objects.

HttpContext(HttpWorkerRequest)

使用指定的辅助请求对象初始化 HttpContext 类的新实例。Initializes a new instance of the HttpContext class that uses the specified worker-request object.

public:
 HttpContext(System::Web::HttpWorkerRequest ^ wr);
public HttpContext (System.Web.HttpWorkerRequest wr);
new System.Web.HttpContext : System.Web.HttpWorkerRequest -> System.Web.HttpContext
Public Sub New (wr As HttpWorkerRequest)

参数

wr
HttpWorkerRequest

当前 HTTP 请求的 HttpWorkerRequest 对象。The HttpWorkerRequest object for the current HTTP request.

HttpContext(HttpRequest, HttpResponse)

使用指定的请求和响应对象初始化 HttpContext 类的新实例。Initializes a new instance of the HttpContext class by using the specified request and response objects.

public:
 HttpContext(System::Web::HttpRequest ^ request, System::Web::HttpResponse ^ response);
public HttpContext (System.Web.HttpRequest request, System.Web.HttpResponse response);
new System.Web.HttpContext : System.Web.HttpRequest * System.Web.HttpResponse -> System.Web.HttpContext
Public Sub New (request As HttpRequest, response As HttpResponse)

参数

request
HttpRequest

当前 HTTP 请求的 HttpRequest 对象。The HttpRequest object for the current HTTP request.

response
HttpResponse

当前 HTTP 请求的 HttpResponse 对象。The HttpResponse object for the current HTTP request.

适用于