Interface IObservableEvent
Event-like object that triggers callbacks when they subscribe after the event already triggered.
Namespace: Unity.Cloud.DataStreaming.Runtime
Assembly: Unity.Cloud.DataStreaming.Runtime.dll
Syntax
public interface IObservableEvent
Methods
Subscribe(Action)
Subscribes to the event. The action is executed immediately if not
doing so would make the receiver be in an incoherent state. "Incoherent state" is
implementation defined and can vary between different events.
Declaration
void Subscribe(Action action)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | action | The action invoked when the event triggers. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
Unsubscribe(Action)
Unsubscribes from the event.
Declaration
void Unsubscribe(Action action)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | action | The action to will no be longer invoked when the event triggers. |