private void UpdateUploadContext(ProgressWorkerRequest progressWorker)
 {
     if (RadUploadContext.GetCurrent(this.Context) == null)
     {
         RadUploadContext.SetUploadContext(this.Context, this.CreateContext(progressWorker));
     }
     else if (this.IsAsyncUploadRequest)
     {
         RadAsyncUploadContext current = RadUploadContext.Current as RadAsyncUploadContext;
         if (current != null)
         {
             current.RequestLength += this.Context.Request.ContentLength;
             current.UploadsInProgress++;
         }
     }
 }
 private void ReleaseContexts()
 {
     if (this.IsAsyncUploadRequest)
     {
         RadAsyncUploadContext current = RadUploadContext.Current as RadAsyncUploadContext;
         if (current == null)
         {
             return;
         }
         current.UploadsInProgress--;
         if (current.UploadsInProgress > 0)
         {
             return;
         }
     }
     RadProgressContext.RemoveProgressContext(this.Context);
     RadUploadContext.RemoveUploadContext(this.Context);
 }