コード例 #1
0
 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++;
         }
     }
 }
コード例 #2
0
 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);
 }