hiexam
microsoft · AI-102 · Q268 · code_completion · azure_face_api, code_snippet_completion, dotnet

Complete the following code snippet properly to process images for adding to a person group.

Complete the following code snippet properly to process images for adding to a person group.
Parallel.For(0, PersonCount, async i => {
    Guid personId = persons[i].PersonId;
    string personImageDir = $"/path/to/person/{i}/images";
    foreach (string imagePath in Directory.GetFiles(personImageDir, "*.jpg")) {
        using ({{slot1}} t = File.OpenRead(imagePath))
        {
            await faceClient.PersonGroupPerson.{{slot2}}(personGroupId, personId, t);
        }
    }
});
Correct slot values

Answer hidden

Unlock AI-102

First 5 questions of every exam are free. Unlock the rest.

Includes
  • · All — questions
  • · Verified answers + AI explanations
  • · Spaced-repetition mistake notebook
  • · Phone, tablet, laptop sync

One-time payment. Doesn't auto-renew. · Already paid? Sign in