Interface IRoomMonitoring
Provides functionalities to start or stop monitoring rooms.
Namespace: Unity.Cloud.Presence
Syntax
public interface IRoomMonitoring
Properties
AllMonitoredRooms
Gets all monitored rooms.
Declaration
ReadOnlyDictionary<RoomId, BaseRoom> AllMonitoredRooms { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyDictionary<RoomId, BaseRoom> |
ConnectionStatus
Gets the status of the connection to the monitoring service.
Declaration
ConnectionStatus ConnectionStatus { get; }
Property Value
| Type | Description |
|---|---|
| ConnectionStatus |
Methods
StartMonitoringAsync(BaseRoom, IRetryPolicy, CancellationToken)
Starts monitoring a room for participant connections.
Declaration
Task StartMonitoringAsync(BaseRoom room, IRetryPolicy retryPolicy, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseRoom | room | The room to monitor |
| IRetryPolicy | retryPolicy | The retry policy to execute the operation |
| CancellationToken | cancellationToken | Cancellation token that will try to cancel the operation |
Returns
| Type | Description |
|---|---|
| Task | Task representing the request to monitor |
StopMonitoringAllAsync()
Stops monitoring all rooms.
Declaration
Task StopMonitoringAllAsync()
Returns
| Type | Description |
|---|---|
| Task | Task representing the request to stop monitoring |
StopMonitoringAsync(BaseRoom, IRetryPolicy, CancellationToken)
Stops monitoring a room for participant connections.
Declaration
Task StopMonitoringAsync(BaseRoom room, IRetryPolicy retryPolicy, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseRoom | room | The room to stop monitoring |
| IRetryPolicy | retryPolicy | The retry policy to execute the operation |
| CancellationToken | cancellationToken | Cancellation token that will try to cancel the operation |
Returns
| Type | Description |
|---|---|
| Task | Task representing the request to stop monitoring |
Events
ConnectionStatusChanged
Generates an event when the status of the connection changes.
Declaration
event Action<ConnectionStatus> ConnectionStatusChanged
Event Type
| Type | Description |
|---|---|
| Action<ConnectionStatus> |
ParticipantConnected
Generates an event whenever a participant connects to any monitored room.
Declaration
event Action<IParticipant> ParticipantConnected
Event Type
| Type | Description |
|---|---|
| Action<IParticipant> |
ParticipantDisconnected
Generates an event whenever a participant disconnects to any monitored room.
Declaration
event Action<IParticipant> ParticipantDisconnected
Event Type
| Type | Description |
|---|---|
| Action<IParticipant> |