/// <summary>
        /// Get the status of the session. Stores returned session internally.
        /// Updates internal list of ranges remaining to be uploaded (according to the server).
        /// </summary>
        /// <returns>UploadSession returned by the server.</returns>
        public virtual async Task <UploadSession> UpdateSessionStatusAsync()
        {
            var request    = new UploadSessionRequest(this.Session, this.client, null);
            var newSession = await request.GetAsync();

            var newRangesRemaining = this.GetRangesRemaining(newSession);

            this.rangesRemaining = newRangesRemaining;
            newSession.UploadUrl = this.Session.UploadUrl; // Sometimes the UploadUrl is not returned
            this.Session         = newSession;
            return(newSession);
        }
        /// <summary>
        /// Get the status of the session. Stores returned session internally.
        /// Updates internal list of ranges remaining to be uploaded (according to the server).
        /// </summary>
        /// <returns>UploadSession returned by the server.</returns>
        public virtual async Task<UploadSession> UpdateSessionStatusAsync()
        {
            var request = new UploadSessionRequest(this.Session, this.client, null);
            var newSession = await request.GetAsync();
            
            var newRangesRemaining = this.GetRangesRemaining(newSession);

            this.rangesRemaining = newRangesRemaining;
            newSession.UploadUrl = this.Session.UploadUrl; // Sometimes the UploadUrl is not returned
            this.Session = newSession;
            return newSession;
        }
 /// <summary>
 /// Delete the session.
 /// </summary>
 /// <returns>Once returned task is complete, the session has been deleted.</returns>
 public async Task DeleteSession()
 {
     var request = new UploadSessionRequest(this.Session, this.client, null);
     await request.DeleteAsync();
 }
 /// <summary>
 /// Delete the session.
 /// </summary>
 /// <returns>Once returned task is complete, the session has been deleted.</returns>
 public async Task DeleteSession()
 {
     var request = new UploadSessionRequest(this.Session, this.client, null);
     await request.DeleteAsync();
 }