示例#1
0
        private static RadProgressContext SetProgressContext(HttpContext context)
        {
            RadProgressContext context2 = new RadProgressContext();

            context.Application["RadProgressContext" + RadUploadContext.GetUploadUniqueIdentifier(context)] = context2;
            return(context2);
        }
示例#2
0
        private ProgressData GetProgressData()
        {
            RadUploadContext current = RadUploadContext.GetCurrent(HttpContext.Current);

            if ((current != null) && !current.UploadComplete)
            {
                return(current.GetProgressData());
            }
            return(null);
        }
 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);
 }
示例#5
0
 internal static void SetUploadContext(HttpContext context, RadUploadContext uploadContext)
 {
     context.Application["RadUploadContext" + GetUploadUniqueIdentifier(context)] = uploadContext;
 }
示例#6
0
 public static void RemoveProgressContext(HttpContext context)
 {
     context.Application.Remove("RadProgressContext" + RadUploadContext.GetUploadUniqueIdentifier(context));
 }
示例#7
0
 private static RadProgressContext GetProgressContext(HttpContext context)
 {
     return(context.Application["RadProgressContext" + RadUploadContext.GetUploadUniqueIdentifier(context)] as RadProgressContext);
 }
 internal static void SetUploadContext(HttpContext context, RadUploadContext uploadContext)
 {
     context.Application["RadUploadContext" + GetUploadUniqueIdentifier(context)] = uploadContext;
 }