ConfigurationElementCollectionBase<T> 类

定义

为配置元素的强类型集合提供抽象基类。

generic <typename T>
 where T : ConfigurationElementpublic ref class ConfigurationElementCollectionBase abstract : Microsoft::Web::Administration::ConfigurationElement, System::Collections::Generic::IEnumerable<T>, System::Collections::ICollection
public abstract class ConfigurationElementCollectionBase<T> : Microsoft.Web.Administration.ConfigurationElement, System.Collections.Generic.IEnumerable<T>, System.Collections.ICollection where T : ConfigurationElement
type ConfigurationElementCollectionBase<'T (requires 'T :> ConfigurationElement)> = class
    inherit ConfigurationElement
    interface ICollection
    interface seq<'T (requires 'T :> ConfigurationElement)>
    interface IEnumerable
Public MustInherit Class ConfigurationElementCollectionBase(Of T)
Inherits ConfigurationElement
Implements ICollection, IEnumerable(Of T)

类型参数

T
继承
ConfigurationElementCollectionBase<T>
派生
实现

注解

ConfigurationElementCollectionBase<T> 使你能够配置和管理配置元素的集合。

可以使用整数索引访问此集合中的元素。 此集合中的索引从零开始。

重要

提供此基类是为了方便实现者创建自定义配置元素集合。 此类标记为抽象;因此,无法直接创建此类的实例。

构造函数

ConfigurationElementCollectionBase<T>()

初始化 ConfigurationElementCollectionBase<T> 类的新的空实例。

属性

AllowsAdd

获取一个值,该值指示元素名称是否 add 在当前集合架构中定义。

AllowsClear

获取一个值,该值指示是否 clear 在当前集合架构中定义了元素名称。

AllowsRemove

获取一个值,该值指示是否 remove 在当前集合架构中定义了元素名称。

Attributes

获取包含此元素的属性列表的配置属性集合。

(继承自 ConfigurationElement)
ChildElements

获取当前元素的所有子元素。

(继承自 ConfigurationElement)
Count

获取集合中的项数。

ElementTagName

为配置元素的强类型集合提供抽象基类。

(继承自 ConfigurationElement)
IsLocallyStored

获取一个值,该值指示配置元素是否存储在特定的配置文件中。

(继承自 ConfigurationElement)
Item[Int32]

获取指定索引处的配置元素。

Item[String]

获取或设置具有指定名称的属性。

(继承自 ConfigurationElement)
Methods

获取配置元素的方法集合。

(继承自 ConfigurationElement)
RawAttributes

为配置元素的强类型集合提供抽象基类。

(继承自 ConfigurationElement)
Schema

获取描述配置元素集合的架构。

方法

Add(T)

将配置元素添加到当前集合的末尾。

AddAt(Int32, T)

将配置元素添加到当前集合中的指定索引处。

Clear()

清除当前集合中的所有配置元素。

CreateElement()

为当前集合创建新的子元素。

CreateElement(String)

使用指定的名称创建新的子元素。

CreateNewElement(String)

使用指定的元素名称创建新元素。

Delete()

为配置元素的强类型集合提供抽象基类。

(继承自 ConfigurationElement)
GetAttribute(String)

返回一个 ConfigurationAttribute 对象,该对象表示请求的属性。

(继承自 ConfigurationElement)
GetAttributeValue(String)

返回指定特性的值。

(继承自 ConfigurationElement)
GetChildElement(String)

返回当前配置元素下且具有指定名称的子元素。

(继承自 ConfigurationElement)
GetChildElement(String, Type)

返回一个子元素,该子元素位于当前配置元素下,具有指定的名称和类型。

(继承自 ConfigurationElement)
GetCollection()

返回当前配置元素的默认集合。

(继承自 ConfigurationElement)
GetCollection(String)

返回属于当前配置元素的所有配置元素。

(继承自 ConfigurationElement)
GetCollection(String, Type)

返回具有指定名称和类型的配置元素,并且位于当前配置元素下。

(继承自 ConfigurationElement)
GetCollection(Type)

返回具有指定类型且位于当前配置元素下的配置元素。

(继承自 ConfigurationElement)
GetEnumerator()

返回循环访问集合的枚举数。

GetMetadata(String)

从元素架构返回元数据值。

(继承自 ConfigurationElement)
IndexOf(T)

确定集合中元素的索引。

Remove(T)

从集合中删除元素的第一个匹配项。

RemoveAt(Int32)

删除集合中指定索引处的元素。

SetAttributeValue(String, Object)

设置所指定特性的值。

(继承自 ConfigurationElement)
SetMetadata(String, Object)

设置元素架构中的元数据值。

(继承自 ConfigurationElement)

显式接口实现

ICollection.CopyTo(Array, Int32)

从特定的数组索引开始,将集合的元素复制到数组中。

ICollection.Count

为配置元素的强类型集合提供抽象基类。

ICollection.IsSynchronized

为配置元素的强类型集合提供抽象基类。

ICollection.SyncRoot

为配置元素的强类型集合提供抽象基类。

IEnumerable.GetEnumerator()

返回一个循环访问集合的枚举器。

适用于