語言

HttpHandlerAction 建構函式

定義

初始化 HttpHandlerAction 類別的新執行個體。

多載

名稱 Description
HttpHandlerAction(String, String, String)

利用傳遞的參數初始化類別的新實例 HttpHandlerAction 。

HttpHandlerAction(String, String, String, Boolean)

利用傳遞的參數初始化類別的新實例 HttpHandlerAction 。

HttpHandlerAction(String, String, String)

利用傳遞的參數初始化類別的新實例 HttpHandlerAction 。

public:
 HttpHandlerAction(System::String ^ path, System::String ^ type, System::String ^ verb);
public HttpHandlerAction(string path, string type, string verb);
new System.Web.Configuration.HttpHandlerAction : string * string * string -> System.Web.Configuration.HttpHandlerAction
Public Sub New (path As String, type As String, verb As String)

參數

path
String

網址 HttpHandlerAction 路徑。

type
String

一個逗號分隔的類別/組合組合,包含版本、文化和公鑰標記。

verb
String

一個逗號分隔的 HTTP 動詞清單(例如「GET, PUT, POST」)。

備註

建 HttpHandlerAction 構子並非直接從你的程式碼中使用。 它由 ASP.NET 配置系統稱為此。 你可以透過使用該HttpHandlerAction屬性取得該Handlers類別的實例。

適用於

HttpHandlerAction(String, String, String, Boolean)

利用傳遞的參數初始化類別的新實例 HttpHandlerAction 。

public:
 HttpHandlerAction(System::String ^ path, System::String ^ type, System::String ^ verb, bool validate);
public HttpHandlerAction(string path, string type, string verb, bool validate);
new System.Web.Configuration.HttpHandlerAction : string * string * string * bool -> System.Web.Configuration.HttpHandlerAction
Public Sub New (path As String, type As String, verb As String, validate As Boolean)

參數

path
String

網址 HttpHandlerAction 路徑。

type
String

一個逗號分隔的類別/組合組合,包含版本、文化和公鑰標記。

verb
String

一個逗號分隔的 HTTP 動詞清單(例如「GET, PUT, POST」)。

validate
Boolean

true允許驗證;否則,。 false 若 false,ASP.NET 會嘗試載入類別,直到實際匹配請求來到,雖然可能延遲錯誤,但會縮短啟動時間。

範例

以下程式碼範例展示了如何建立 HttpHandlerAction 物件。

// Add a new HttpHandlerAction to the Handlers property HttpHandlerAction collection.
httpHandlersSection.Handlers.Add(new HttpHandlerAction(
    "Calculator.custom", 
    "Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler", 
    "GET", 
    true));
' Add a new HttpHandlerAction to the Handlers property HttpHandlerAction collection.
httpHandlersSection.Handlers.Add(new HttpHandlerAction( _
    "Calculator.custom", _
    "Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler", _
    "GET", _
    true))

備註

建 HttpHandlerAction 構子並非直接從你的程式碼中使用。 它由 ASP.NET 配置系統稱為此。 你可以透過使用該HttpHandlerAction屬性取得該Handlers類別的實例。

適用於