Tasks.GetCompletedTasksAsync
Description
The API gets the list of all completed Tasks from the connected Control Room.
Signature [C#]
Task<CRTasks> GetCompletedTasksAsync()
Properties
Output
Property | Description |
---|---|
Task<CRTasks> | Returns all completed tasks information from the Control Room. |
Remarks
Use GetCompletedTasksAsync API to get the list of all completed tasks information from the connected Control Room.
Example
C#
public void GetCompletedTasks()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
CRTasks cRTasks = Task.Run(() => context.Tasks.GetCompletedTasksAsync()).Result;
foreach (CRTaskInfo taskData in cRTasks.Data)
System.Console.WriteLine("Task Name: " + taskData.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;
}