Exemple #1
0
 private void ReadNextDownloadResult()
 {
     m_streamReadState           = StreamReadState.Response;
     m_streamBytesNeeded         = ResponseLen;
     m_streamBytesRead           = 0;
     m_nextFileCompleteEventArgs = new DownloadFinishedEventArgs {
         Result = DownloadResult.Failure
     };
     BeginReadHeader();
 }
Exemple #2
0
        private void OnDownloadFinished(DownloadFinishedEventArgs e)
        {
            m_downloadQueue.Dequeue();
            e.DownloadQueueLength = m_downloadQueue.Count;

            if (DownloadFinished != null)
            {
                DownloadFinished(this, e);
            }

            if (m_downloadQueue.Count > 0)
            {
                ReadNextDownloadResult();
            }
        }