EnterpriseVariable.GetVariableValue
Description
Retrieves the value of the specified Enterprise Variable from the connected Control Room
Signature [C#]
Task<EnterpriseVariable> GetVariableValue(string propertyName, string key)
Properties
Input
Property | Description |
---|---|
propertyName | Specify the name of the enterprise variable to be retrieved. |
key | [for future usage] |
Output
Property | Description |
---|---|
Task<EnterpriseVariable> | Returns the specified enterprise variable. |
Remarks
Use GetVariableValue API to get the enterprise variable value from the connected Control Room.
Example
C#
public void GetEnterpriseVariableValue()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
string propertyName = "TestEvar03";
string key = null;
EnterpriseVariable enterpriseVariable = Task.Run(() => context.EnterpriseVariables.GetVariableValue(propertyName, key)).Result;
Console.WriteLine("EnterpriseVariable 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;
}