Пример #1
0
        private List <Models.Book> GetBooks(Models.Source source)
        {
            List <Models.Book>        s   = new List <Models.Book>();
            List <ReaderService.Book> tmp = new List <ReaderService.Book>();

            using (ReaderServiceSoapClient svc = new ReaderServiceSoapClient())
            {
                tmp.AddRange(svc.getBookslst(ProgramStatics.Token));
            }
            //svcClosed();

            foreach (ReaderService.Book b in tmp)
            {
                if (b.SourceID == source.SourceID)
                {
                    s.Add(SvcBooktoBook(b));
                }
            }

            foreach (Models.Book b in s)
            {
                b.BookLastChapterAddress = this.GetLastChapter(b.BookID).ChapterAddress;
                b.Chapters.AddRange(GetChapters(b));
            }
            return(s);
        }
Пример #2
0
        public Models.Source SvcSourcetoSource(ReaderService.Source b)
        {
            Models.Source val = new Models.Source();
            val.Books         = ConvertBooks(b.Books);
            val.SourceAddress = b.SourceAddress;
            val.SourceID      = b.SourceID;
            val.SourceName    = b.SourceName;

            return(val);
        }