The RunReferencesDecorator class allows you to create a references decorator that automatically opens to newly added components that implement the IOpenable interface and closes removed components that implement the IClosable interface.
Creates a new instance of the decorator.
- nextReferences: IReferences - next references or decorator in the chain.
- topReferences: IReferences - decorator at the top of the chain.
Puts a new reference into the reference map.
publicput(locator: any, component: any): void
- locator: any - locator to find the reference by.
- reference: any - component reference to be added.
Removes a previously added component that matches the specified locator. If many references match the locator, it removes only the first one. When all references shall be removed, use the removeAll method instead.
publicremove(locator: any): any
- locator: any - locator to remove component
- returns: any - removed component.
Removes all component references that match the specified locator.
publicremoveAll(locator: any): any
- locator: any - locator to remove references by.
- returns: any - list containing all removed references.