Connections.GetConnectionDataAsync
Description
Gets the specified connection from the connected Control Room
Signature [C#]
Task<ConnectionData> GetConnectionDataAsync(int connectionId)
Properties
Input
Property | Description |
---|---|
connectionId | Specify the id of the connection to be retrieved. |
Output
Property | Description |
---|---|
Task<ConnectionData> | Returns the details of the specified connection. |
Remarks
Use GetConnectionDataAsync API to get information about the connection from the connected Control Room.
Example
C#
public void GetConnectionData()
{
IControlRoomContext context = LoginControlRoom();
int connectionId = 3;
var connection = Task.Run(() => context.Connections.GetConnectionDataAsync(connectionId)).Result;
Console.WriteLine("Connection Value: " + connection.Value);
}
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;
}