Which two actions s...
 
Notifications
Clear all

Which two actions should you perform? Each correct answer presents part of the solution. NOTE:

1 Posts
1 Users
0 Likes
241 Views
 Man
(@shortinoman)
Noble Member
Joined: 2 years ago
Posts: 733
Topic starter  

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.

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. (Choose two.)

  • A . Remove the Guid.Parse(operationId) parameter.
  • B . Add code to verify the results.Status value.
  • C . Add code to verify the status of the txtHeaders.Status value.
  • D . Wrap the call to GetReadResultAsync within a loop that contains a delay.

Show Answer Hide Answer

Suggested Answer: BD

Explanation:

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

   
Quote

Latest Microsoft AI-102 Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: