Esempio n. 1
0
        private static RadProgressContext SetProgressContext(HttpContext context)
        {
            RadProgressContext context2 = new RadProgressContext();

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

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