Search Results for

    Show / Hide Table of Contents

    Class ConfigurationElementCollectionBase<T>

    Represents a base class for configuration elements containing a collection of child elements.

    Inheritance
    object
    ConfigurationElement
    ConfigurationElementCollection
    ConfigurationElementCollectionBase<T>
    BinarySecretElementCollection
    CorsElementCollection
    RsaKeyElementCollection
    TaskElementCollection
    ValueElementCollection
    X509CertificateElementCollection
    X509CertificateReferenceElementCollection
    Implements
    ICollection
    IList<T>
    ICollection<T>
    IEnumerable<T>
    IEnumerable
    Inherited Members
    ConfigurationElementCollection.IsModified()
    ConfigurationElementCollection.ResetModified()
    ConfigurationElementCollection.SetReadOnly()
    ConfigurationElementCollection.Equals(object)
    ConfigurationElementCollection.GetHashCode()
    ConfigurationElementCollection.Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)
    ConfigurationElementCollection.Reset(ConfigurationElement)
    ConfigurationElementCollection.CopyTo(ConfigurationElement[], int)
    ConfigurationElementCollection.BaseAdd(ConfigurationElement)
    ConfigurationElementCollection.BaseAdd(ConfigurationElement, bool)
    ConfigurationElementCollection.BaseIndexOf(ConfigurationElement)
    ConfigurationElementCollection.BaseAdd(int, ConfigurationElement)
    ConfigurationElementCollection.BaseRemove(object)
    ConfigurationElementCollection.BaseGet(object)
    ConfigurationElementCollection.BaseIsRemoved(object)
    ConfigurationElementCollection.BaseGet(int)
    ConfigurationElementCollection.BaseGetAllKeys()
    ConfigurationElementCollection.BaseGetKey(int)
    ConfigurationElementCollection.BaseClear()
    ConfigurationElementCollection.BaseRemoveAt(int)
    ConfigurationElementCollection.OnDeserializeUnrecognizedElement(string, XmlReader)
    ConfigurationElementCollection.CreateNewElement(string)
    ConfigurationElementCollection.CreateNewElement()
    ConfigurationElementCollection.IsElementRemovable(ConfigurationElement)
    ConfigurationElementCollection.IsElementName(string)
    ConfigurationElementCollection.AddElementName
    ConfigurationElementCollection.RemoveElementName
    ConfigurationElementCollection.ClearElementName
    ConfigurationElementCollection.Count
    ConfigurationElementCollection.EmitClear
    ConfigurationElementCollection.IsSynchronized
    ConfigurationElementCollection.SyncRoot
    ConfigurationElementCollection.ElementName
    ConfigurationElementCollection.ThrowOnDuplicate
    ConfigurationElementCollection.CollectionType
    ConfigurationElement.Init()
    ConfigurationElement.ListErrors(IList)
    ConfigurationElement.InitializeDefault()
    ConfigurationElement.SetPropertyValue(ConfigurationProperty, object, bool)
    ConfigurationElement.SerializeToXmlElement(XmlWriter, string)
    ConfigurationElement.DeserializeElement(XmlReader, bool)
    ConfigurationElement.OnRequiredPropertyNotFound(string)
    ConfigurationElement.PostDeserialize()
    ConfigurationElement.PreSerialize(XmlWriter)
    ConfigurationElement.OnDeserializeUnrecognizedAttribute(string, string)
    ConfigurationElement.GetTransformedTypeString(string)
    ConfigurationElement.GetTransformedAssemblyString(string)
    ConfigurationElement.LockAttributes
    ConfigurationElement.LockAllAttributesExcept
    ConfigurationElement.LockElements
    ConfigurationElement.LockAllElementsExcept
    ConfigurationElement.LockItem
    ConfigurationElement.this[ConfigurationProperty]
    ConfigurationElement.this[string]
    ConfigurationElement.Properties
    ConfigurationElement.ElementInformation
    ConfigurationElement.EvaluationContext
    ConfigurationElement.ElementProperty
    ConfigurationElement.HasContext
    ConfigurationElement.CurrentConfiguration
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: Nevatech.Vsb.Repository.Configuration
    Assembly: Nevatech.Vsb.Repository.dll
    Syntax
    [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
    public abstract class ConfigurationElementCollectionBase<T> : ConfigurationElementCollection, ICollection, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable where T : ConfigurationElement
    Type Parameters
    Name Description
    T

    The type of the collection item.

    Constructors

    ConfigurationElementCollectionBase()

    Declaration
    protected ConfigurationElementCollectionBase()

    Properties

    IsReadOnly

    Gets a value indicating whether this collection is read-only.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    bool

    this[int]

    Returns the element from this collection by index.

    Declaration
    public T this[int index] { get; set; }
    Parameters
    Type Name Description
    int index

    The zero-based index within this collection.

    Property Value
    Type Description
    T

    The ConfigurationElement.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the specified index is out of range.

    ArgumentNullException

    Thrown if the specified item is a null reference.

    Methods

    Add(T)

    Adds new ConfigurationElement to this collection.

    Declaration
    public void Add(T item)
    Parameters
    Type Name Description
    T item

    The ConfigurationElement to add.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the specified item is a null reference.

    Clear()

    Removes all elements from this collection.

    Declaration
    public void Clear()

    Contains(T)

    Determines whether this collection contains a specific ConfigurationElement.

    Declaration
    public bool Contains(T item)
    Parameters
    Type Name Description
    T item

    The ConfigurationElement to search for.

    Returns
    Type Description
    bool

    True if the specified element was found, false otherwise.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the specified item is a null reference.

    CopyTo(T[], int)

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

    Declaration
    public void CopyTo(T[] array, int arrayIndex)
    Parameters
    Type Name Description
    T[] array

    The one-dimensional array that is the destination of the elements copied from this collection. The array must have zero-based indexing.

    int arrayIndex

    The zero-based index in array at which copying begins.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the specified array is a null reference.

    ArgumentOutOfRangeException

    Thrown if the specified arrayIndex is out of range.

    GetElementKey(ConfigurationElement)

    Gets the element key for a specified configuration element.

    Declaration
    protected override object GetElementKey(ConfigurationElement element)
    Parameters
    Type Name Description
    ConfigurationElement element

    The ConfigurationElement to return the key for.

    Returns
    Type Description
    object

    An object that acts as the key for the specified ConfigurationElement.

    Overrides
    ConfigurationElementCollection.GetElementKey(ConfigurationElement)
    Exceptions
    Type Condition
    ArgumentException

    Thrown, if provided element is not of the collection item type.

    GetEnumerator()

    Returns an enumerator that iterates through this collection.

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    IEnumerator<T>

    An enumerator that can be used to iterate through the collection.

    IndexOf(T)

    Returns index of the specified element in the collection.

    Declaration
    public int IndexOf(T item)
    Parameters
    Type Name Description
    T item

    The ConfigurationElement to search for.

    Returns
    Type Description
    int

    Index of the specified element in the collection, or -1, if item was not found.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the specified item is a null reference.

    Insert(int, T)

    Inserts provided element at the specified index location in the collection.

    Declaration
    public void Insert(int index, T item)
    Parameters
    Type Name Description
    int index

    Index in the collection where element needs to be added.

    T item

    The ConfigurationElement to be added.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the specified item is a null reference.

    ArgumentOutOfRangeException

    Thrown if the specified index is out of range.

    Remove(T)

    Removes the specified ConfigurationElement from this collection.

    Declaration
    public bool Remove(T item)
    Parameters
    Type Name Description
    T item

    The ConfigurationElement to remove.

    Returns
    Type Description
    bool

    True if element was removed, false otherwise.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the specified item is a null reference.

    RemoveAt(int)

    Removes element stored in the collection at the specified index location.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    int index

    Index in the collection which points to an element that needs to be removed.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the specified index is out of range.

    SerializeElement(XmlWriter, bool)

    Writes the configuration data to an XML element in the configuration file without emitting <clear/> element.

    Declaration
    protected override bool SerializeElement(XmlWriter writer, bool serializeCollectionKey)
    Parameters
    Type Name Description
    XmlWriter writer

    Output stream that writes XML to the configuration file.

    bool serializeCollectionKey

    True to serialize the collection key; otherwise, false.

    Returns
    Type Description
    bool

    True if the System.Configuration.ConfigurationElementCollection was written to the configuration file successfully.

    Overrides
    ConfigurationElementCollection.SerializeElement(XmlWriter, bool)

    Implements

    ICollection
    IList<T>
    ICollection<T>
    IEnumerable<T>
    IEnumerable
    In This Article
    Back to top Nevatech Sentinet 6.7 Online Documentation