示例#1
0
        /// <summary>
        /// <para>Begins an asynchronous send to the set profile photo route.</para>
        /// </summary>
        /// <param name="photo">Image to set as the user's new profile photo.</param>
        /// <param name="callback">The method to be called when the asynchronous send is
        /// completed.</param>
        /// <param name="callbackState">A user provided object that distinguished this send
        /// from other send requests.</param>
        /// <returns>An object that represents the asynchronous send request.</returns>
        public sys.IAsyncResult BeginSetProfilePhoto(PhotoSourceArg photo,
                                                     sys.AsyncCallback callback,
                                                     object callbackState = null)
        {
            var setProfilePhotoArg = new SetProfilePhotoArg(photo);

            return(this.BeginSetProfilePhoto(setProfilePhotoArg, callback, callbackState));
        }
示例#2
0
        /// <summary>
        /// <para>Begins an asynchronous send to the set profile photo route.</para>
        /// </summary>
        /// <param name="setProfilePhotoArg">The request parameters.</param>
        /// <param name="callback">The method to be called when the asynchronous send is
        /// completed.</param>
        /// <param name="state">A user provided object that distinguished this send from other
        /// send requests.</param>
        /// <returns>An object that represents the asynchronous send request.</returns>
        public sys.IAsyncResult BeginSetProfilePhoto(SetProfilePhotoArg setProfilePhotoArg, sys.AsyncCallback callback, object state = null)
        {
            var task = this.SetProfilePhotoAsync(setProfilePhotoArg);

            return(enc.Util.ToApm(task, callback, state));
        }
示例#3
0
        /// <summary>
        /// <para>Sets a user's profile photo.</para>
        /// </summary>
        /// <param name="photo">Image to set as the user's new profile photo.</param>
        /// <returns>The task that represents the asynchronous send operation. The TResult
        /// parameter contains the response from the server.</returns>
        /// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
        /// processing the request; This will contain a <see
        /// cref="SetProfilePhotoError"/>.</exception>
        public t.Task <SetProfilePhotoResult> SetProfilePhotoAsync(PhotoSourceArg photo)
        {
            var setProfilePhotoArg = new SetProfilePhotoArg(photo);

            return(this.SetProfilePhotoAsync(setProfilePhotoArg));
        }
示例#4
0
 /// <summary>
 /// <para>Sets a user's profile photo.</para>
 /// </summary>
 /// <param name="setProfilePhotoArg">The request parameters</param>
 /// <returns>The task that represents the asynchronous send operation. The TResult
 /// parameter contains the response from the server.</returns>
 /// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
 /// processing the request; This will contain a <see
 /// cref="SetProfilePhotoError"/>.</exception>
 public t.Task <SetProfilePhotoResult> SetProfilePhotoAsync(SetProfilePhotoArg setProfilePhotoArg)
 {
     return(this.Transport.SendRpcRequestAsync <SetProfilePhotoArg, SetProfilePhotoResult, SetProfilePhotoError>(setProfilePhotoArg, "api", "/account/set_profile_photo", "user", global::Dropbox.Api.Account.SetProfilePhotoArg.Encoder, global::Dropbox.Api.Account.SetProfilePhotoResult.Decoder, global::Dropbox.Api.Account.SetProfilePhotoError.Decoder));
 }