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(); }
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; }
public PullDownloadListAction(IDownloadFactory downloadFactory) { _downloadFactory = downloadFactory ?? throw new ArgumentNullException(nameof(downloadFactory)); }
public SpkService(ICacheService cacheService, IDownloadFactory downloadFactory, ILogger <SpkService> logger) { this.cacheService = cacheService; this.downloadFactory = downloadFactory; this.logger = logger; }
public DownloadCli(IDownloadFactory downloadFactory) { _downloadFactory = downloadFactory; }