/// <summary> /// This operation generates a description of an image in human readable /// language with complete sentences. The description is based on a collection /// of content tags, which are also returned by the operation. More than one /// description can be generated for each image. Descriptions are ordered by /// their confidence score. All descriptions are in English. /// Two input methods are supported -- (1) Uploading an image or (2) specifying /// an image URL. /// A successful response will be returned in JSON. If the request failed, the /// response will contain an error code and a message to help understand what /// went wrong. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='image'> /// An image stream. /// </param> /// <param name='maxCandidates'> /// Maximum number of candidate descriptions to be returned. The default is 1. /// </param> /// <param name='language'> /// The desired language for output generation. If this parameter is not /// specified, the default value is &quot;en&quot;.Supported /// languages:en - English, Default. es - Spanish, ja - Japanese, pt - /// Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', /// 'ja', 'pt', 'zh' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ImageDescription> DescribeImageInStreamAsync(this IComputerVisionClient operations, Stream image, int?maxCandidates = 1, string language = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DescribeImageInStreamWithHttpMessagesAsync(image, maxCandidates, language, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }