Example #1
0
        public CurrentDownloadsViewModel(IEventAggregator eventAggregator, IDownloadFactory downloadFactory, IVideoFactory videoFactory, IDataService dataService, IDownloadService downloadService)
        {
            eventAggregator.Subscribe(this);
            _downloadService = downloadService;
            _downloadFactory = downloadFactory;

            ((ListCollectionView)CollectionViewSource.GetDefaultView(Downloads)).CustomSort = Comparer <IDownloadViewModel> .Create((first, second) => - first.DownloadStatus.DownloadState.CompareTo(second.DownloadStatus.DownloadState));

            SelectedDownloads.CollectionChanged += (sender, e) => RecomputeActionGuards();
        }
Example #2
0
 public CacheService(IDownloadFactory factory, ILogger <CacheService> logger)
 {
     if (!Directory.Exists(AppSettingsProvider.AppSettings.FrontendCacheFolder))
     {
         Directory.CreateDirectory(AppSettingsProvider.AppSettings.FrontendCacheFolder);
     }
     if (!Directory.Exists(AppSettingsProvider.AppSettings.BackendCacheFolder))
     {
         Directory.CreateDirectory(AppSettingsProvider.AppSettings.BackendCacheFolder);
     }
     this.downloadFactory = factory;
     this.logger          = logger;
 }
Example #3
0
 public PullDownloadListAction(IDownloadFactory downloadFactory)
 {
     _downloadFactory = downloadFactory ?? throw new ArgumentNullException(nameof(downloadFactory));
 }
Example #4
0
 public SpkService(ICacheService cacheService, IDownloadFactory downloadFactory, ILogger <SpkService> logger)
 {
     this.cacheService    = cacheService;
     this.downloadFactory = downloadFactory;
     this.logger          = logger;
 }
Example #5
0
 public DownloadCli(IDownloadFactory downloadFactory)
 {
     _downloadFactory = downloadFactory;
 }