A collection type (or collection definition) defines how instances of a particular type of collection will behave. The properties of the collection type determine:
The kind of relationship that a particular collection type uses to relate objects to each other is determined by its CollectionItem collection. The CollectionItem collection associates a single relationship type to the collection type. To add a new collection type, use the InterfaceDef object.
A CollectionDef object is also a RepositoryObject and a RepositoryObjectVersion object. In addition to the members described here, you can access members that are defined for those objects as well as members of IInterfaceMember2 and IVersionAdminInfo. For more information about accessing a member of an interface that is not the default interface, see Accessing Automation Object Members.
Use the CollectionDef object to retrieve or modify the properties of a collection type, to determine the kind of relationship that the collection implements, or to determine the interface to which the collection is attached.
Property | Description |
---|---|
DispatchID | The dispatch identifier to use when accessing an instance of this type of collection |
Flags | Flags that specify details about this collection definition |
IsOrigin | Indicates whether collections of this type are origin collections |
MemberSynonym | Stores a synonym of the collection name |
MaxCount | The maximum number of target objects that can be contained in a collection of this type |
MinCount | The minimum number of target objects that must be contained in a collection of this type |
Name | Stores the name of a collection |
Collection | Description |
---|---|
CollectionItem | The collection of one relationship type that defines the relationship between target objects of this type of collection and a single source object |
Interface | The interface to which this collection definition is attached |
Properties | The collection of all persistent properties that are attached to the CollectionDef object |