예제 #1
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.IUploadMedia.
 /// </param>
 public static MediaUploadResults PostAsync(this IUploadMedia operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IUploadMedia)s).PostAsyncAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the RgApiJenya class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public RgApiJenya(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._albums       = new Albums(this);
     this._comment      = new Comment(this);
     this._invitations  = new Invitations(this);
     this._media        = new Media(this);
     this._notification = new Notification(this);
     this._profile      = new Profile(this);
     this._search       = new Search(this);
     this._test         = new Test(this);
     this._timeline     = new Timeline(this);
     this._uploadMedia  = new UploadMedia(this);
     this._userImages   = new UserImages(this);
     this._baseUri      = new Uri("https://microsoft-apiappc0ca0972af5842ffbdf629275d59d5b9.azurewebsites.net");
 }
예제 #3
0
        /// <param name='operations'>
        /// Reference to the Rg.ClientApp.IUploadMedia.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <MediaUploadResults> PostAsyncAsync(this IUploadMedia operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <Rg.ClientApp.Models.MediaUploadResults> result = await operations.PostAsyncWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }