/// <summary> /// Use this interface to get the result of a Read Document operation, /// employing the state-of-the-art Optical Character Recognition (OCR) /// algorithms optimized for text-heavy documents. When you use the Read /// Document interface, the response contains a field called /// "Operation-Location". The "Operation-Location" field contains the URL that /// you must use for your "Get Read Result operation" to access OCR results. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='image'> /// An image stream. /// </param> /// <param name='mode'> /// Type of text to recognize. Possible values include: 'Handwritten', /// 'Printed' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <BatchReadFileInStreamHeaders> BatchReadFileInStreamAsync(this IComputerVisionClient operations, Stream image, TextRecognitionMode mode, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BatchReadFileInStreamWithHttpMessagesAsync(image, mode, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }