示例#1
0
 private void HandleSingleSourceLinkRefresh(SingleSourceHTTPDownloadInfo info)
 {
     if (refreshLinkCandidate == null)
     {
         return;
     }
     ((SingleSourceHTTPDownloader)refreshLinkCandidate).SetDownloadInfo(info);
     refreshLinkCandidate = null;
     RefreshedLinkReceived?.Invoke(this, EventArgs.Empty);
     ClearRefreshRecivedEvents();
 }
示例#2
0
        private void HandleSingleSourceLinkRefresh(Message message)
        {
            if (refreshLinkCandidate == null)
            {
                return;
            }
            var info = new SingleSourceHTTPDownloadInfo
            {
                Uri     = message.Url,
                Headers = message?.RequestHeaders,
                Cookies = message?.Cookies
            };

            ((SingleSourceHTTPDownloader)refreshLinkCandidate).SetDownloadInfo(info);
            refreshLinkCandidate = null;
            RefreshedLinkReceived?.Invoke(this, EventArgs.Empty);
            ClearRefreshRecivedEvents();
        }