private void SaveDownloadQueue() { try { DownloadQueueStorage.SaveDownloadQueue(downloadQueueFilePath, downloadQueue); } catch (Exception exception) { Logger.Exception(exception); } }
public Downloader() { downloadQueueLock = new object(); downloadQueueFilePath = Path.Combine(Environment.AppDataDirectory, DOWNLOAD_LIST_FILE_NAME); downloadQueue = DownloadQueueStorage.LoadDownloadQueue(downloadQueueFilePath); eventQueue = new BlockingCollection <EventArgs>(); downloadTaskResetEvent = new AutoResetEvent(false); localization = null; httpClient = null; downloadSettings = null; isInOfflineMode = false; isShuttingDown = false; StartEventPublisherTask(); downloadTask = StartDownloadTask(); }