示例#1
0
 /// <summary>
 /// Intialize download queue
 /// </summary>
 private void InitializeDownloadQueue()
 {
     if (this.downloadQueue == null)
     {
         this.downloadQueue = new DownloadQueue(2);
         this.downloadCancellationTokenSource = new CancellationTokenSource();
     }
 }
示例#2
0
 /// <summary>
 /// Cancel queue processing
 /// </summary>
 public void CancelQueue()
 {
     if (this.downloadQueue != null && this.downloadCancellationTokenSource != null)
     {
         this.downloadCancellationTokenSource.Cancel();
         this.downloadQueue.Dispose();
         this.downloadQueue = null;
     }
 }