Skip to main content

Connections.GetAllConnectionsAsync

Description

Gets the list of all connections from the connected Control Room

Signature [C#]

Task<List<Connection>> GetAllConnectionsAsync()

Properties

Input

PropertyDescription
filterSpecify the filter expression to get the desired connections.

Output

PropertyDescription
Task<List<Connection>>Returns the list of all available connections.

Remarks

Use GetAllConnectionsAsync API to list all available connections from the connected Control Room.

Example

C#
public void GetAllConnections()
{
IControlRoomContext context = LoginControlRoom();

var connections = Task.Run(() => context.Connections.GetAllConnectionsAsync(string.Empty)).Result;
for each (Connection connection in connections)
Console.WriteLine("Connection Name: " + connection.Name);
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}