HttpHandlerAction 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 HttpHandlerAction 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| 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 URL 路径。
- 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 URL 路径。
- 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实例。