Skip to main content
Version: Current

Tasks.UpdateTaskAsync

Description​

Update the task with specified CRTaskInfo from the connected AI Command Center.

Signature [C#]​

Task UpdateTaskAsync(CRTaskInfo cRTaskInfo);

Properties​

Input​

ParameterTypeRequired / defaultDescription
cRTaskInfoCRTaskInfoRequiredSpecify the update details of a task.

Remarks​

Use UpdateTaskAsync API to update with specified CRTaskInfo from the connected AI Command Center.

Example​

C#
public async Task UpdateTask()
{
IControlRoomContext context = LoginControlRoom();
try
{
string updateTaskName = "updateTask";
CRTaskInfo cRTaskInfo = new CRTaskInfo()
{
TaskId = 1,
Name = updateTaskName
};
await context.Tasks.UpdateTaskAsync(cRTaskInfo);
}
finally
{
context.Close();
}
}
Connection helper
public IControlRoomContext LoginControlRoom()
{
string RequiredSetting(string name) => Environment.GetEnvironmentVariable(name) ?? throw new InvalidOperationException($"Set {name} before running this example.");
string serverUrl = RequiredSetting("INTELLIBUDDIES_SERVER_URL");
string userName = RequiredSetting("INTELLIBUDDIES_USERNAME");
string password = RequiredSetting("INTELLIBUDDIES_PASSWORD");
string connectionString = $"ServerUrl={serverUrl};UserName={userName};Password={password}";
IControlRoomContext context = new ControlRoomContext(connectionString);
context.Open();
return context;
}

See Get started for namespaces, configuration, and context cleanup, and SDK usage for error handling.