Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I'm wanting to create an API that watches for failures on the QMS Api. I'm using the code from here:
When I put this code into my application though, I get the below errors. There seems to be some mismatch around when lists and arrays are used? I've tried fiddling with the code but can't get it to work. Has anyone come across this when working with the API?
EDIT: So it seems that the below works:
TaskStatusFilter taskStatusFilter = new TaskStatusFilter();
TaskStatusValue[] taskStatusValues = new TaskStatusValue[1];
taskStatusValues[0] = TaskStatusValue.Failed;
taskStatusFilter.TaskStatuses = taskStatusValues;
var taskStatuses = apiClient.GetTaskStatuses(taskStatusFilter, TaskStatusScope.Extended); // A service call.
Console.WriteLine(taskStatuses[0].Extended.TaskSummary.ToString()); // Print part of the metadata of the first element in the list.
It seems that my edit in the above is the solution as this is now working in my application. It seems that while previously (and according to the documentation), "GetTaskStatuses" returned a list of taskStatuses, it now returns an array of taskStatuses for whatever reason.
It seems that my edit in the above is the solution as this is now working in my application. It seems that while previously (and according to the documentation), "GetTaskStatuses" returned a list of taskStatuses, it now returns an array of taskStatuses for whatever reason.