SimpleWorkerRequest 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 SimpleWorkerRequest 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| SimpleWorkerRequest(String, String, TextWriter) |
當目標應用域已使用該SimpleWorkerRequest方法建立後,初始化該類別的新CreateApplicationHost(Type, String, String)實例。 |
| SimpleWorkerRequest(String, String, String, String, TextWriter) |
當使用者程式碼建立SimpleWorkerRequest一個(將 作為HttpContext參數傳遞給 |
SimpleWorkerRequest(String, String, TextWriter)
當目標應用域已使用該SimpleWorkerRequest方法建立後,初始化該類別的新CreateApplicationHost(Type, String, String)實例。
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
要請求的頁面(或相對於應用程式目錄的虛擬路徑)。
- query
- String
查詢字串的文字。
- output
- TextWriter
TextWriter A能捕捉回應的輸出。
適用於
SimpleWorkerRequest(String, String, String, String, TextWriter)
當使用者程式碼建立SimpleWorkerRequest一個(將 作為HttpContext參數傳遞給SimpleWorkerRequest建構子)時,初始化該HttpContext類別的新實例以用於任意應用域。
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」。
- appPhysicalDir
- String
應用程式目錄的實體路徑;例如,「C:\app」。
- page
- String
請求的虛擬路徑(相對於應用程式目錄)。
- query
- String
查詢字串的文字。
- output
- TextWriter
TextWriter A能捕捉回應的輸出。
例外狀況
在此情境下,該 appVirtualDir 參數無法被覆寫。