MethodDef Object
When you define a class for an information model, you specify the interfaces that the class implements. For each of those interfaces, you specify the members (properties, methods, and collections) that are attached to the interface. To attach a new method to an interface, use the CreateMethodDef method of the InterfaceDef object.
The definition of a method as a member of an interface does not result in the storage of method implementation logic in the repository. However, the method name is added to the set of defined member names for that interface. It also reserves the dispatch identifier of the method in the set of defined dispatch identifier values for the interface.
A MethodDef object is also a RepositoryObject and a RepositoryObjectVersion object. You can also access members that are defined for those objects and members of IInterfaceMember2 and IVersionAdminInfo2. For more information about accessing a member of an interface that is not the default interface, see Accessing Automation Object Members.
When to Use
Use the MethodDef object to access or modify the characteristics of a method definition, or to determine the interface definition to which a particular method is attached.
Properties
Property | Description |
---|---|
DispatchID | The dispatch identifier to use when invoking a method that conforms to this method definition |
Flags | Flags that specify details about this method definition |
MemberSynonym | Stores a synonym of the method name |
Methods
Method | Description |
---|---|
CreateParameterDef | Defines a ParameterDef object for this method definition |
Collections
Collection | Description |
---|---|
Interface | The interface to which this method definition is attached |
Properties | The collection of all persistent properties that are attached to the MethodDef object |