Skip to main content

SmartStation.GetAllSmartStationsAsync

Description

Gets the list of all available SmartStation details from the connected Control Room.

Signature [C#]

Task<List<SmartStation>> GetAllSmartStationsAsync()

Properties

Output

PropertyDescription
Task<List<SmartStation>>Returns all available smart stations information from the Control Room.

Remarks

Use GetAllSmartStationsAsync API to get the list of all available SmartStation information from the connected Control Room.

Example

C#
public void GetAllSmartStations()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");

var smartStations = Task.Run(() => context.Machines.GetAllSmartStationsAsync()).Result;
foreach(SmartStation smartStation in expectedSmartStations)
System.Console.WriteLine("SmartStation Name: " + smartStation.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;
}