Example #1
0
 /// <summary>
 /// Building webResult from <see cref="cacheResponse"/>
 /// </summary>
 /// <param name="__response">The response.</param>
 public webResult(cacheResponse __response)
 {
     _byteSize = System.Text.ASCIIEncoding.Unicode.GetByteCount(__response.content);
     document.deploySource(__response.content, enums.webRequestActionType.localFile);
     response = __response.httpContent;
     request  = new webRequestFile(response.responseUrl, enums.webRequestActionType.localFile);
 }
Example #2
0
        internal void loadCache()
        {
            cacheResponse cr = webCacheSystem.loadCache(url);

            if (cr.cacheFound)
            {
                //result.response = new webResponse();
                result.response       = cr.httpContent;
                result.request.status = status;
                if (cr.httpContent == null)
                {
                    status = webRequestEventType.callRetry;
                    // Thread.CurrentThread.Abort();
                }
                else
                {
                    result.request.url = cr.httpContent.responseUrl;

                    result.document.deploySource(cr.content, action, htmlSettings);
                    status = webRequestEventType.executedOk;
                    if (doLogCacheLoaded)
                    {
                        aceLog.log("Cache: " + url + " (" + status.toString() + ")");
                    }
                }
            }
            else
            {
                status = webRequestEventType.callRetry;
            }
        }