public MainWindowViewModel(IFeedDownloader feedDownloader, IConfigurationPersister configurationPersister) { this.feedDownloader = feedDownloader; this.configurationPersister = configurationPersister; feeds = new ObservableCollection <Feed>(); Feeds = new ReadOnlyObservableCollection <Feed>(feeds); DownloadCommand = new RelayCommand((param) => Download(param as FeedItem), (param) => !(param as FeedItem)?.Downloading ?? false); Configuration = configurationPersister.Load(); foreach (var feed in Configuration.Feeds) { feeds.Add(feed); } }
public PodcastCollection(IFeedDownloader downloader) { this.downloader = downloader; if (Windows.ApplicationModel.DesignMode.DesignModeEnabled) this.downloadTask = LoadDesignMode(); else this.downloadTask = RetrievePodcasts(); }
public RnsSearchResultsUrlLinkProvider(IAppConfiguration configuration, IFeedDownloader feedDownloader) { _configuration = configuration; _feedDownloader = feedDownloader; }