ReposRoot Contents Collection

See Also

The collection of all projects that are contained within a repository. This property is not attached to the default interface for the repository root object; it is attached to the IMpoProjectItemContainer interface. For details on how to access a member of an interface that is not the default interface, see Accessing Automation Object Members.

Collection Descriptor Descriptor Value
Relationship Type ProjectItemContainer-Contains-ProjectItems
Source Is Origin Yes
Minimum Collection Size Zero
Maximum Collection Size Many
Sequenced Collection No
Deletes Propagated Yes
Destinations Named Yes
Case Sensitive Names No
Unique Names Yes

Syntax

object.Contents(index)

The Contents collection syntax has these parts:

Part Description
object An object expression; evaluates to an object that implements IMpoProjectItemContainer as the default interface.
index An integer index that identifies which element in the collection is to be addressed. The valid range is from one to the number of elements in the collection. The number of elements in the collection is specified by object.Contents.Count.

Remarks

The Contents collection is a heterogeneous collection; it can contain any kind of project item that implements the IMpoProjectItem interface. If you are using the collection to enumerate a particular kind of project item, be sure to check the Type property of each project item to skip over project items that are not of the desired type.

The name assigned to a project via a naming relationship of this collection is adorned to ensure that the name is unique among the collection of all Visual Basic projects in the collection. The adornment follows these rules: