Roles.GetAllRolesAsync
Description
Gets the list of RoleInfo of all Roles from the connected Control Room
Signature [C#]
Task<List<RoleInfo>> GetAllRolesAsync()
Properties
Output
Property | Description |
---|---|
Task<List<RoleInfo>> | Returns all available roles information from the Control Room. |
Remarks
Use GetAllRolesAsync API to get all available Roles information from the connected Control Room.
Example
C#
public void GetAllRoles()
{
IControlRoomContext context = LoginControlRoom();
var rolesInfo = Task.Run(() => context.Roles.GetAllRolesAsync()).Result;
foreach (RoleInfo roles in rolesInfo)
Console.WriteLine("RoleName: " + roles.RoleName);
}
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;
}