OrderedCollectionBase<T> Class

Represents a metadata object collection that preserves item ordering.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Management.SqlParser.MetadataProvider.OrderedCollectionBase<T>
    Microsoft.SqlServer.Management.SqlParser.MetadataProvider.OrderedCollection<T>

Namespace:  Microsoft.SqlServer.Management.SqlParser.MetadataProvider
Assembly:  Microsoft.SqlServer.Management.SqlParser (in Microsoft.SqlServer.Management.SqlParser.dll)

Syntax

'Declaration
Public MustInherit Class OrderedCollectionBase(Of T As {Class, IMetadataObject}) _
    Implements IMutableMetadataOrderedCollection(Of T), IMetadataOrderedCollection(Of T),  _
    IMutableMetadataCollection(Of T), IMetadataCollection(Of T), IEnumerable(Of T),  _
    IEnumerable
'Usage
Dim instance As OrderedCollectionBase(Of T)
public abstract class OrderedCollectionBase<T> : IMutableMetadataOrderedCollection<T>, 
    IMetadataOrderedCollection<T>, IMutableMetadataCollection<T>, IMetadataCollection<T>, IEnumerable<T>, 
    IEnumerable 
where T : class, IMetadataObject
generic<typename T>
where T : ref class, IMetadataObject 
public ref class OrderedCollectionBase abstract : IMutableMetadataOrderedCollection<T>, 
    IMetadataOrderedCollection<T>, IMutableMetadataCollection<T>, IMetadataCollection<T>, IEnumerable<T>, 
    IEnumerable
[<AbstractClassAttribute>]
type OrderedCollectionBase<'T when 'T : not struct and IMetadataObject> =  
    class 
        interface IMutableMetadataOrderedCollection<'T>
        interface IMetadataOrderedCollection<'T>
        interface IMutableMetadataCollection<'T>
        interface IMetadataCollection<'T>
        interface IEnumerable<'T>
        interface IEnumerable 
    end
JScript does not support generic types and methods.

Type Parameters

  • T
    The type of the elements in the collection.

The OrderedCollectionBase<T> type exposes the following members.

Constructors

  Name Description
Protected method OrderedCollectionBase<T> Initializes a new instance of the OrderedCollectionBase<T> class that uses the specified capacity and CollationInfo object.

Top

Properties

  Name Description
Public property AsMetadataObjectCollection Gets an IMetadataCollection<T> object that contains this collection.
Public property Count Gets the number of elements in the collection.
Public property Item[Int32] Gets the element at the specified index.
Public property Item[String] Gets or sets the element that has the specified name.

Top

Methods

  Name Description
Public method Add Adds an object to the collection using its name as the key.
Public method AddRange Adds the elements of the specified collection to this collection.
Public method Clear Removes all elements from the collection.
Public method Clone() Creates an IMutableMetadataCollection<T> instance that is a copy of this object, except for the elements.
Public method Clone(Boolean) Creates an IMutableMetadataCollection<T> instance that is a copy of this object and, if specified, also copies the elements.
Public method Contains(String) Determines whether the specified element is in the collection.
Public method Contains(T) Determines whether the specified element is in the collection.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method FindAll(Predicate<T>) Finds all elements in the collection that match the conditions that are defined by the specified predicate.
Public method FindAll(String) Finds all elements in the collection that have the specified name.
Public method GetEnumerator Returns an enumerator that iterates through the collection.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Remove(String) Removes the element that has the specified name from the collection.
Public method Remove(T) Removes the specified element from the collection.
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Returns an enumerator that can iterate through the collection.
Explicit interface implemetationPrivate property IMetadataCollection<T>.Item Gets the element that has the specified name.

Top

Remarks

This collection can be used when the order of the items must be preserved (for example, parameter collections).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SqlServer.Management.SqlParser.MetadataProvider Namespace