Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="requestContext"></param>
        void RaiseWritingProgressChanged(WebRequestContext requestContext)
        {
            var _argument = new WebRequestWritingProgressChangedEventArgs(requestContext, requestContext.RequestState.TotalBytesHandled, requestContext.ContentLength);

            if (null != WritingProgressChanged)
            {
                WritingProgressChanged(this, _argument);
            }

            OnWritingProgressChanged(_argument);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="e"></param>
        protected override void OnWritingProgressChanged(WebRequestWritingProgressChangedEventArgs e)
        {
            base.OnWritingProgressChanged(e);

            if (e.RequestContext.IsAsync)
            {
                if (e.RequestContext.RequestMethod.Equals(WebRequestMethod.DownloadFile))
                {
                    if (null != DownloadProgressChanged)
                    {
                        DownloadProgressChanged(this, e);
                    }
                }
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnWritingProgressChanged(WebRequestWritingProgressChangedEventArgs e)
 {
 }