Share via


ConfigurationElementCollectionBase<T> Class

Definition

Provides the abstract base class for a strongly typed collection of configuration elements.

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)

Type Parameters

T
Inheritance
ConfigurationElementCollectionBase<T>
Derived
Implements

Remarks

The ConfigurationElementCollectionBase<T> class enables you to configure and manage a collection of configuration elements.

You can access elements in this collection by using an integer index. Indexes in this collection are zero-based.

Important

This base class is provided to make it easier for implementers to create a custom configuration element collection. This class is marked as abstract; therefore, instances of this class cannot be created directly.

Constructors

ConfigurationElementCollectionBase<T>()

Initializes a new empty instance of the ConfigurationElementCollectionBase<T> class.

Properties

AllowsAdd

Gets a value indicating whether an add element name is defined in the current collection schema.

AllowsClear

Gets a value indicating whether a clear element name is defined in the current collection schema.

AllowsRemove

Gets a value indicating whether a remove element name is defined in the current collection schema.

Attributes

Gets a configuration attribute collection that contains the list of attributes for this element.

(Inherited from ConfigurationElement)
ChildElements

Gets all the child elements of the current element.

(Inherited from ConfigurationElement)
Count

Gets the number of items in the collection.

ElementTagName (Inherited from ConfigurationElement)
IsLocallyStored

Gets a value indicating whether the configuration element is stored in a particular configuration file.

(Inherited from ConfigurationElement)
Item[Int32]

Gets a configuration element at the specified index.

Item[String]

Gets or sets an attribute with the specified name.

(Inherited from ConfigurationElement)
Methods

Gets a collection of methods for the configuration element.

(Inherited from ConfigurationElement)
RawAttributes (Inherited from ConfigurationElement)
Schema

Gets the schema that describes the configuration element collection.

Methods

Add(T)

Adds a configuration element to the end of the current collection.

AddAt(Int32, T)

Adds a configuration element to the current collection at the specified index.

Clear()

Clears all configuration elements from the current collection.

CreateElement()

Creates a new child element for the current collection.

CreateElement(String)

Creates a new child element by using the specified name.

CreateNewElement(String)

Creates a new element by using the specified element name.

Delete() (Inherited from ConfigurationElement)
GetAttribute(String)

Returns a ConfigurationAttribute object that represents the requested attribute.

(Inherited from ConfigurationElement)
GetAttributeValue(String)

Returns the value of the specified attribute.

(Inherited from ConfigurationElement)
GetChildElement(String, Type)

Returns a child element that is under the current configuration element and has the specified name and type.

(Inherited from ConfigurationElement)
GetChildElement(String)

Returns a child element that is under the current configuration element and has the specified name.

(Inherited from ConfigurationElement)
GetCollection()

Returns the default collection for the current configuration element.

(Inherited from ConfigurationElement)
GetCollection(String, Type)

Returns the configuration element that has the specified name and type and is under the current configuration element.

(Inherited from ConfigurationElement)
GetCollection(String)

Returns all configuration elements that belong to the current configuration element.

(Inherited from ConfigurationElement)
GetCollection(Type)

Returns the configuration element that has the specified type and is under the current configuration element.

(Inherited from ConfigurationElement)
GetEnumerator()

Returns an enumerator that iterates through a collection.

GetMetadata(String)

Returns metadata values from the element schema.

(Inherited from ConfigurationElement)
IndexOf(T)

Determines the index of an element in the collection.

Remove(T)

Removes the first occurrence of an element from the collection.

RemoveAt(Int32)

Removes the element at the specified index of the collection.

SetAttributeValue(String, Object)

Sets the value of the specified attribute.

(Inherited from ConfigurationElement)
SetMetadata(String, Object)

Sets metadata values from the element schema.

(Inherited from ConfigurationElement)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

Copies the elements of the collection to an array, starting at a particular array index.

ICollection.Count
ICollection.IsSynchronized
ICollection.SyncRoot
IEnumerable.GetEnumerator()

Returns an enumerator that iterates through the collection.

Applies to