Skip to main content

Tasks.UpdateTaskAsync

Description

Update the task with specified [CRTaskInfo](../../models//crtaskinfo/cr_task_info.md from the connected Control Room.

Signature [C#]

Task UpdateTaskAsync(CRTaskInfo cRTaskInfo)

Properties

Input

PropertyDescription
CRTaskInfoSpecify the update details of a task.

Remarks

Use UpdateTaskAsync API to update with specified CRTaskInfo from the connected Control Room.

Example

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

string updateTaskName = "updateTask";

CRTaskInfo cRTaskInfo = new CRTaskInfo()
{
TaskId = 1,
Name = updateTaskName
};
Task.Run(() => context.Tasks.UpdateTaskAsync(cRTaskInfo)).Wait();
}
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;
}