DependencyCollection Class

The DependencyCollection class represents a collection of Dependency objects that are used to derive the node classes in SMO scripting operations.


Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public class DependencyCollection : IList<DependencyCollectionNode>, 
	ICollection<DependencyCollectionNode>, IEnumerable<DependencyCollectionNode>, IEnumerable

The DependencyCollection type exposes the following members.

Public methodDependencyCollectionInitializes a new instance of the DependencyCollection class.

Public propertyCountGets the number of DependencyCollectionNode objects in the DependencyCollection object.
Public propertyItemGets a DependencyCollectionNode object in the collection by index number.

Public methodAddAdds a Dependency object to the DependencyCollection object.
Public methodAddRangeAdds a range of nodes to the collection.
Public methodClearRemoves all the DependencyCollectionNode objects from the referenced DependencyCollection object.
Public methodContainsDetermines whether the specified DependencyCollectionNode object is a member of the DependencyCollection object.
Public methodContainsUrnDetermines whether the specified Urn object exists on the specified server.
Public methodCopyToCopies the collection objects to a one-dimensional array beginning at the index value specified.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetEnumeratorGets an enumerator that can iterate through the list of objects.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodIndexOfReturns the index value of the DependencyCollectionNode object within the DependencyCollection object.
Public methodInsertInserts a DependencyCollectionNode object at the specified index position in the DependencyCollection object.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRemoveRemoves a DependencyCollectionNode object from the DependencyCollection object.
Public methodRemoveAtRemoves a DependencyCollectionNode object from the DependencyCollection object and the specified index position.
Public methodToString (Inherited from Object.)

Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an IEnumerator interface that is required to iterate through a collection.
Explicit interface implemetationPrivate propertyICollection<DependencyCollectionNode>.IsReadOnlyDetermines if the dependency collection is read-only.

A DependencyCollection object can be used to gain access to a set of scripting dependencies. You can use the Item property to return a specific Dependency object.

Thread Safety

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

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

Community Additions