Interface IObservableEvent<T>
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<out T>
Type Parameters
| Name | Description |
|---|---|
| T |
Methods
Subscribe(Action<T>)
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<out T> action)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<T> | action | The action invoked when the event triggers. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
Unsubscribe(Action<T>)
Unsubscribes from the event.
Declaration
void Unsubscribe(Action<out T> action)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<T> | action | The action to will no be longer invoked when the event triggers. |