Interface with methods used to set references for components that depend on other components.
Description
The IReferenceable interface allows you to set references for components that depend on other components.
Important points
- If a component requires explicit notification to unset references, it must also implement the IUnreferenceable interface.
Instance methods
setReferences
Sets references to dependent components.
void setReferences(IReferences references)
- references: IReferences - references to locate the component’s dependencies.
Examples
class MyController implements IReferenceable {
IMyPersistence persistence ;
...
void setReferences(IReferences references ) {
persistence = references.getOneRequired<IMyPersistence>(
Descriptor('mygroup', 'persistence', '*', '*', '1.0')
);
}
...
}