private static RadProgressContext SetProgressContext(HttpContext context) { RadProgressContext context2 = new RadProgressContext(); context.Application["RadProgressContext" + RadUploadContext.GetUploadUniqueIdentifier(context)] = context2; return(context2); }
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); }
internal static void SetUploadContext(HttpContext context, RadUploadContext uploadContext) { context.Application["RadUploadContext" + GetUploadUniqueIdentifier(context)] = uploadContext; }
public static void RemoveProgressContext(HttpContext context) { context.Application.Remove("RadProgressContext" + RadUploadContext.GetUploadUniqueIdentifier(context)); }
private static RadProgressContext GetProgressContext(HttpContext context) { return(context.Application["RadProgressContext" + RadUploadContext.GetUploadUniqueIdentifier(context)] as RadProgressContext); }