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