You are developing a method that uses the Computer Vision client library. The method will perform optical character recognition (OCR) in images. The method has ...


Microsoft AI-102 Exam

Questions Number: 60 out of 241 Questions
24.90%

Question 60
You are developing a method that uses the Computer Vision client library. The method will perform optical character recognition (OCR) in images. The method has the following code.
AI-102_60Q.jpg related to the Microsoft AI-102 Exam
During testing, you discover that the call to the GetReadResultAsync method occurs before the read operation is complete.
You need to prevent the GetReadResultAsync method from proceeding until the read operation is complete.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.



Example code :
do
{
results = await client.GetReadResultAsync(Guid.Parse(operationId));
}
while ((results.Status == OperationStatusCodes.Running ||
results.Status == OperationStatusCodes.NotStarted));
Reference:
https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/dotnet/ComputerVision/ComputerVisionQuickstart.cs





Previous Questions Next Questions



Premium Version