Example #1
0
 public DownloadMgr(string tempResRootPath, string transferInfoFileName)
 {
     _transferMgr    = new BreakpointTransferMgr(tempResRootPath, transferInfoFileName);
     _pendingTasks   = new Queue <DownloadTask>();
     _finishedTasks  = new Queue <DownloadTask>();
     _tempTasks      = new Queue <DownloadTask>();
     _downloadThread = new DownloadThread(_transferMgr, _pendingTasks, _finishedTasks);
 }
Example #2
0
 public DownloadThread(BreakpointTransferMgr transferMgr, Queue <DownloadTask> consumeQueue, Queue <DownloadTask> produceQueue)
 {
     _transferMgr              = transferMgr;
     _currentTaskFileName      = "";
     _currentTaskReceivedBytes = 0;
     _currentTaskTotalBytes    = 1;
     _pendingTasks             = consumeQueue;
     _finishedTasks            = produceQueue;
     _isWaitting = false;
     _isStop     = true;
     //ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
 }