private RadUploadContext CreateContext(ProgressWorkerRequest progressWorker) {/* * if (this.IsAsyncUploadRequest) * { * RadAsyncUploadContext context; * return new RadAsyncUploadContext(this.Context.Request.ContentLength, progressWorker.RequestStateStore) { UploadsInProgress = context.UploadsInProgress + 1 }; * }*/ return(new RadUploadContext(this.Context.Request.ContentLength, progressWorker.RequestStateStore)); }
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++; } } }
protected virtual void ReleaseWorkerRequest(object sender, EventArgs e) { if (this.Application == null) { this._application = sender as HttpApplication; } if (this.IsUploadRequest(this.Application)) { FieldInfo workerRequestField = this.GetWorkerRequestField(); this.ReleaseContexts(); if ((workerRequestField != null)) { ProgressWorkerRequest request = workerRequestField.GetValue(this.Context.Request) as ProgressWorkerRequest; if (request != null) { workerRequestField.SetValue(this.Context.Request, request._originalWorkerRequest); } } } }
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 RadUploadContext CreateContext(ProgressWorkerRequest progressWorker) { /* if (this.IsAsyncUploadRequest) { RadAsyncUploadContext context; return new RadAsyncUploadContext(this.Context.Request.ContentLength, progressWorker.RequestStateStore) { UploadsInProgress = context.UploadsInProgress + 1 }; }*/ return new RadUploadContext(this.Context.Request.ContentLength, progressWorker.RequestStateStore); }