Exemple #1
0
 /// <summary>
 /// Upload a new image
 /// </summary>
 /// Images will be resized. To access a resized image, append the 1 character
 /// size identifier to the blobHandle that is returned.
 ///
 /// - d is 25 pixels wide
 /// - h is 50 pixels wide
 /// - l is 100 pixels wide
 /// - p is 250 pixels wide
 /// - t is 500 pixels wide
 /// - x is 1000 pixels wide
 ///
 /// - ImageType.UserPhoto supports d,h,l,p,t,x
 /// - ImageType.ContentBlob supports d,h,l,p,t,x
 /// - ImageType.AppIcon supports l
 ///
 /// All resized images will maintain their aspect ratio. Any
 /// orientation specified in the EXIF headers will be honored.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='imageType'>
 /// Image type. Possible values include: 'UserPhoto', 'ContentBlob', 'AppIcon'
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 /// <param name='image'>
 /// MIME encoded contents of the image
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PostImageResponse> PostImageAsync(this IImages operations, ImageType imageType, string authorization, System.IO.Stream image, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PostImageWithHttpMessagesAsync(imageType, authorization, image, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }