void SetDateAddedProvider(ISimpleDataSource dataSource) { var files = dataSource as FileBasedSimpleDataSource; if (files == null) { return; } files.DateAddedProvider = new DateAddedProvider(this.DateAddedText); }
async Task DoView() { this.BookFileList = new ObservableCollection <MatchInfo>(); _simpleDataSource = this.SelectedSimpleDataSourceInfo.GetSimpleDataSource(); SetDateAddedProvider(_simpleDataSource); _messageListener.Write("View: starting"); IEnumerable <BookInfo> books = await _simpleDataSource.GetBooks(this.IncludeMobi, this.IncludeEpub); IEnumerable <MatchInfo> matches = books.Select(b => new MatchInfo(b) { IsSelected = true }); SetBookFileList(matches); _messageListener.Write("View: loaded {0} books", this.BookFileList.Count); }
public Uploader(IFullDataSource originalDataSource, ISimpleDataSource incomingDataSource, IOutputMessage messages) { _originalDataSource = originalDataSource; _incomingDataSource = incomingDataSource; _messages = messages; }