HttpHandlerActionCollection 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示元素的 HttpHandlerAction 集合。 此类不能被继承。
public ref class HttpHandlerActionCollection sealed : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.HttpHandlerAction), CollectionType=System.Configuration.ConfigurationElementCollectionType.AddRemoveClearMapAlternate)]
public sealed class HttpHandlerActionCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.HttpHandlerAction), CollectionType=System.Configuration.ConfigurationElementCollectionType.AddRemoveClearMapAlternate)>]
type HttpHandlerActionCollection = class
inherit ConfigurationElementCollection
Public NotInheritable Class HttpHandlerActionCollection
Inherits ConfigurationElementCollection
- 继承
- 属性
示例
下面的代码示例演示如何使用 HttpHandlerActionCollection 集合访问配置文件部分包含 httpHandlers 的信息。
// Get the handlers.
System.Web.Configuration.HttpHandlerActionCollection httpHandlers = httpHandlersSection.Handlers;
'Get the handlers.
Dim httpHandlers As System.Web.Configuration.HttpHandlerActionCollection = httpHandlersSection.Handlers
以下配置摘录显示了如何以声明方式为 httpHandlers 节指定值。
<httpHandlers>
<add path="Calculator.custom"
type="Samples.AspNet.SystemWebConfiguration.Calculator, CalculatorHandler"
verb="GET" validate="false" />
</httpHandlers>
注解
集合 HttpHandlerActionCollection 类型允许访问 HttpHandlerAction 配置节的元素。
构造函数
| 名称 | 说明 |
|---|---|
| HttpHandlerActionCollection() |
初始化 HttpHandlerActionCollection 类的新实例。 |
属性
方法
显式接口实现
| 名称 | 说明 |
|---|---|
| ICollection.CopyTo(Array, Int32) |
将 ConfigurationElementCollection 复制到数组。 (继承自 ConfigurationElementCollection) |
扩展方法
| 名称 | 说明 |
|---|---|
| AsParallel(IEnumerable) |
启用查询的并行化。 |
| AsQueryable(IEnumerable) |
将 IEnumerable 转换为 IQueryable。 |
| Cast<TResult>(IEnumerable) |
将 IEnumerable 的元素强制转换为指定类型。 |
| OfType<TResult>(IEnumerable) |
根据指定类型筛选 IEnumerable 的元素。 |