Accessing Target Object Collections

Meta Data Services Programming

Meta Data Services Programming

Accessing Target Object Collections

Access to target object collections is supported at both the COM and Automation level.

Note  You can use IRepositoryObject2 to access specific collections, even if the collections share the same name through an inherited interface. For more information, see IRepositoryObject2 Interface.

To Use
Include an object in a collection The Add method of the ITargetObjectCol interface.
Exclude an object from a collection The Remove method of the ITargetObjectCol interface.
Enumerate the objects within a target object collection (Automation) The syntax targetObjectCollection(index), as for retrieving an item from any Automation collection.

(COM) The get_Count and get_Item methods of the ITargetObjectCol interface, or use the _NewEnum method of the ITargetObjectCol interface to obtain a standard enumerator interface for the collection.

See Also

Navigating a Repository