SimpleWorkerRequest 构造函数

定义

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

重载

SimpleWorkerRequest(String, String, TextWriter)

在使用 SimpleWorkerRequest 方法创建目标应用程序域之后,初始化 CreateApplicationHost(Type, String, String) 类的新实例。Initializes a new instance of the SimpleWorkerRequest class when the target application domain has been created using the CreateApplicationHost(Type, String, String) method.

SimpleWorkerRequest(String, String, String, String, TextWriter)

在用户代码创建 SimpleWorkerRequest 时(将 SimpleWorkerRequest 作为参数传递给 HttpContext 构造函数),初始化 HttpContext 类的新实例,以用于任意应用程序域中。Initializes a new instance of the SimpleWorkerRequest class for use in an arbitrary application domain, when the user code creates an HttpContext (passing the SimpleWorkerRequest as an argument to the HttpContext constructor).

SimpleWorkerRequest(String, String, TextWriter)

在使用 SimpleWorkerRequest 方法创建目标应用程序域之后,初始化 CreateApplicationHost(Type, String, String) 类的新实例。Initializes a new instance of the SimpleWorkerRequest class when the target application domain has been created using the CreateApplicationHost(Type, String, String) method.

public:
 SimpleWorkerRequest(System::String ^ page, System::String ^ query, System::IO::TextWriter ^ output);
public SimpleWorkerRequest (string page, string query, System.IO.TextWriter output);
new System.Web.Hosting.SimpleWorkerRequest : string * string * System.IO.TextWriter -> System.Web.Hosting.SimpleWorkerRequest
Public Sub New (page As String, query As String, output As TextWriter)

参数

page
String

要请求的页(或该页相对于应用程序目录的虚拟路径)。The page to be requested (or the virtual path to the page, relative to the application directory).

query
String

查询字符串文本。The text of the query string.

output
TextWriter

TextWriter,它捕获响应中的输出A TextWriter that captures output from the response

适用于

SimpleWorkerRequest(String, String, String, String, TextWriter)

在用户代码创建 SimpleWorkerRequest 时(将 SimpleWorkerRequest 作为参数传递给 HttpContext 构造函数),初始化 HttpContext 类的新实例,以用于任意应用程序域中。Initializes a new instance of the SimpleWorkerRequest class for use in an arbitrary application domain, when the user code creates an HttpContext (passing the SimpleWorkerRequest as an argument to the HttpContext constructor).

public:
 SimpleWorkerRequest(System::String ^ appVirtualDir, System::String ^ appPhysicalDir, System::String ^ page, System::String ^ query, System::IO::TextWriter ^ output);
public SimpleWorkerRequest (string appVirtualDir, string appPhysicalDir, string page, string query, System.IO.TextWriter output);
new System.Web.Hosting.SimpleWorkerRequest : string * string * string * string * System.IO.TextWriter -> System.Web.Hosting.SimpleWorkerRequest
Public Sub New (appVirtualDir As String, appPhysicalDir As String, page As String, query As String, output As TextWriter)

参数

appVirtualDir
String

应用程序目录的虚拟路径;例如“/app”。The virtual path to the application directory; for example, "/app".

appPhysicalDir
String

应用程序目录的物理路径;例如“c:\app”。The physical path to the application directory; for example, "c:\app".

page
String

请求的虚拟路径(相对于应用程序目录)。The virtual path for the request (relative to the application directory).

query
String

查询字符串文本。The text of the query string.

output
TextWriter

TextWriter,它捕获响应中的输出。A TextWriter that captures the output from the response.

例外

无法在此上下文中重写 appVirtualDir 参数。The appVirtualDir parameter cannot be overridden in this context.

适用于