Singleton class for sending and receiving events.
More...
Singleton class for sending and receiving events.
delegate void IBM.Watson.DeveloperCloud.Utilities.EventManager.OnReceiveEvent |
( |
object[] |
args | ) |
|
The delegate for an event receiver.
- Parameters
-
void IBM.Watson.DeveloperCloud.Utilities.EventManager.RegisterEventReceiver |
( |
string |
eventName, |
|
|
OnReceiveEvent |
callback |
|
) |
| |
|
inline |
Register an event receiver with this EventManager.
- Parameters
-
eventName | The name of the event. |
callback | The event receiver function. |
bool IBM.Watson.DeveloperCloud.Utilities.EventManager.SendEvent |
( |
string |
eventName, |
|
|
params object[] |
args |
|
) |
| |
|
inline |
Send an event to all registered receivers.
- Parameters
-
eventName | The name of the event to send. |
args | Arguments to send to the event receiver. |
- Returns
- Returns true if a event receiver was found for the event.
void IBM.Watson.DeveloperCloud.Utilities.EventManager.SendEventAsync |
( |
string |
eventName, |
|
|
params object[] |
args |
|
) |
| |
|
inline |
Queues an event to be sent, returns immediately.
- Parameters
-
eventName | The name of the event to send. |
args | Arguments to send to the event receiver. |
void IBM.Watson.DeveloperCloud.Utilities.EventManager.UnregisterAllEventReceivers |
( |
| ) |
|
|
inline |
Unregisters all event receivers.
void IBM.Watson.DeveloperCloud.Utilities.EventManager.UnregisterEventReceiver |
( |
string |
eventName, |
|
|
OnReceiveEvent |
callback |
|
) |
| |
|
inline |
Unregister a specific receiver.
- Parameters
-
eventName | Name of the event. |
callback | The event handler. |
void IBM.Watson.DeveloperCloud.Utilities.EventManager.UnregisterEventReceivers |
( |
string |
eventName | ) |
|
|
inline |
Unregister all event receivers for a given event.
- Parameters
-
eventName | Name of the event to unregister. |
EventManager IBM.Watson.DeveloperCloud.Utilities.EventManager.Instance |
|
staticget |
Returns the singleton event manager instance.
The documentation for this class was generated from the following file: