IRepositoryObject2 Interface
This interface is implemented by all repository objects. It inherits the properties, methods, and collections of IRepositoryObject.
When to Use
Use IRepositoryObject2 to retrieve information about an object, without having to make a roundtrip to the repository database.
You can also use the Properties property on this interface to explicitly define which interfaces and collections to work with. If you are working with inherited interfaces, a collection on the derived interface may assume the same name as the base collection on the base interface. When both collections share the same name, using the IRepositoryObject interface can return either collection, even though the collections may be fundamentally different in other ways. Using IRepositoryObject2 instead of IRepositoryObject allows you to explicitly identify the collection you want, eliminating the possibility that the repository engine will return the wrong collection.
The following example illustrates how to work with same name collections on specific interfaces using IRepositoryObject2. In this case, a base interface and an inherited interface each have a collection named Contains.
Dim MyObject as IRepositoryObject2
MyObject.Properties(IBaseIFace + ".Contains").Value.Add oFile1
MyObject.Properties(IBaseIFace + ".Contains").Value.Add oFile2
MyObject.Properties(IInheritIFace + ".Contains").Value.Add oFile1
Properties
Property | Description |
---|---|
ClassName | Contains the name of the class where the property is used |
ClassType | Returns the ClassDef object that represents this property |
Properties | Allows the application to obtain all properties for the object |