Beamable SDK
|
Public Member Functions | |
Promise | Add (SdkEvent evt) |
Add a SdkEvent to the event pipeline. Any SdkEventConsumers that were created with the Register method, that match the evt's SdkEvent.Source property will be triggered. If there are no events being processed when this method is called, the event will be processed immediately. If there are already events being processed, or if this method is called as a side effect of an earlier call to Add, then the event will be enqueued and processed after all existing events have been processed. More... | |
void | Process () |
This will be removed in a future version of Beamable, please do not use. The processing happens immediately when events are added via the Add method. There should never be a need to manually process the events. More... | |
SdkEventConsumer | Register (string source, SdkEventHandler handler) |
Register a handler function that will trigger anytime an SdkEvent is processed that matches the given source argument. More... | |
void | Unregister (SdkEventConsumer consumer) |
Unregister a SdkEventConsumer so that the SdkEventHandler will not trigger for SdkEvent's of the given SdkEventConsumer.Source. More... | |
Add a SdkEvent to the event pipeline. Any SdkEventConsumers that were created with the Register method, that match the evt's SdkEvent.Source property will be triggered. If there are no events being processed when this method is called, the event will be processed immediately. If there are already events being processed, or if this method is called as a side effect of an earlier call to Add, then the event will be enqueued and processed after all existing events have been processed.
evt | Any SdkEvent |
Implemented in Beamable.Player.SdkEventService.
void Beamable.Player.ISdkEventService.Process | ( | ) |
This will be removed in a future version of Beamable, please do not use. The processing happens immediately when events are added via the Add method. There should never be a need to manually process the events.
Implemented in Beamable.Player.SdkEventService.
SdkEventConsumer Beamable.Player.ISdkEventService.Register | ( | string | source, |
SdkEventHandler | handler | ||
) |
Register a handler function that will trigger anytime an SdkEvent is processed that matches the given source argument.
source | Specify which SdkEvent.Source value the handler will be called for. |
handler | A function that consumes the SdkEvent, and produces a Promise. The processing of an SdkEvent won't complete until all the resulting promises complete. |
Implemented in Beamable.Player.SdkEventService.
void Beamable.Player.ISdkEventService.Unregister | ( | SdkEventConsumer | consumer | ) |
Unregister a SdkEventConsumer so that the SdkEventHandler will not trigger for SdkEvent's of the given SdkEventConsumer.Source.
consumer | The SdkEventConsumer instance to unregister. This must be the instance that was returned from the Register method. |
Implemented in Beamable.Player.SdkEventService.