Example #1
0
        public void WriteError(Exception ex, string message)
        {
            ExceptionInfo e = ex.GetExceptionInfo();

            string err = e.GetFormattedExceptionText();

            ILog log = LogManager.GetLogger("root");

            log.Error(string.Format("An error occured {0}: \n{1}", message, err));

            _messages.Write(string.Format("An error occured {0}: \n{1}", message, err));
        }
Example #2
0
        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);
        }