CallbackRegistry
Generic class to manage a list of callbacks.
Constructor Summary
| Public Constructor | ||
| public |
constructor(wrapper: Function) Creates a new list of callbacks. |
|
Method Summary
| Public Methods | ||
| public |
Registers a new callback. |
|
| public |
Executes the given callback passing arguments. |
|
| public |
clear() Removes all registered callbacks. |
|
| public |
Returns the number of registered callbacks. |
|
| public |
Finds the given callback within the list. |
|
| public |
Removes the given callback from the registry. |
|
| public |
run() Executes all registered callbacks passing given arguments. |
|
Public Constructors
Public Methods
public add(callback: Function, context: Object, trace: Error): Function source
Registers a new callback. Call the wrapper passed on contructur if the argument is not a function. Throws an exception if the callback is already registered.
public indexOf(callback: Function): Number source
Finds the given callback within the list.
Params:
| Name | Type | Attribute | Description |
| callback | Function | to be found |