EnterpriseVariable.GetVariableByIdAsync
Description
Gets the specified Enterprise Variable from the connected Control Room
Signature [C#]
Task<EnterpriseVariable> GetVariableByIdAsync(int Id)
Properties
Input
Property | Description |
---|---|
Id | Specify the ID of the enterprise variable to be retrieved. |
Output
Property | Description |
---|---|
Task<EnterpriseVariable> | Returns the details of the specified enterprise variable. |
Remarks
Use GetVariableByIdAsync API to get information about the enterprise variable from the connected Control Room.
Example
C#
public void GetEnterpriseVariableById()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
int Id = 1;
EnterpriseVariable enterpriseVariable = Task.Run(() => context.EnterpriseVariables.GetVariableByIdAsync(Id)).Result;
Console.WriteLine("Evar Name: " + enterpriseVariable.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;
}