private void AddTorrentSource(TorrentSource source, ITorrentDataSource dataSource, int startPage, string sourceName) { Model.AvailableSources.Add(new DisplaySource { Selected = true, SourceName = sourceName, Source = source, }); _torrentSourceDictionary.Add(source, new SourceInformation { DataSource = dataSource ?? throw new ArgumentNullException(nameof(dataSource)), CurrentPage = startPage, StartPage = startPage, LastPage = false });
private void AddTorrentSource(TorrentSource source, ITorrentDataSource dataSource, int startPage, string siteName) { var availableSite = new DisplaySource { Selected = true, SourceName = siteName, Source = source }; foreach (var sourceName in dataSource.GetSources()) { availableSite.SourceStates.Add(new SourceStateUI(sourceName, isAlive: false, selected: false)); } Model.Settings.AvailableSources.Add(availableSite); _torrentSourceDictionary.Add(source, new SourceInformation { DataSource = dataSource ?? throw new ArgumentNullException(nameof(dataSource)), CurrentPage = startPage, StartPage = startPage, LastPage = false });