Esempio n. 1
0
        public DownloadManager(DependencyInjection dependency)
        {
            var dependency1 = dependency;

            _downloader         = dependency1.Resolve <Downloader>();
            _downloadInfoHelper = dependency1.Resolve <DownloadInfoHelper>();
        }
Esempio n. 2
0
        public Downloader(DirectoryHelper directoryHelper, TaskTimer timerHelper, SourceManager sourceManager, DownloadInfoHelper downloadInfoHelper, DownloadContext downloadContext)
        {
            this._directoryHelper    = directoryHelper;
            this._timerHelper        = timerHelper;
            this._sourceManager      = sourceManager;
            this._downloadInfoHelper = downloadInfoHelper;
            this._downloadContext    = downloadContext;

            var list = _downloadContext.DownloadList.FindAll();

            if (list != null || list.Count > 0)
            {
                foreach (var item in list)
                {
                    if (item.Hq != null && !string.IsNullOrEmpty(item.Hq.Link))
                    {
                        _downloadList.Add(item);
                    }
                }
            }
        }