/// <summary>
        /// Sends request to receive another information about book. (additional information).
        /// </summary>
        /// <param name="book">book to be updated</param>
        /// <returns>Book with additional information.</returns>
        public async Task<Book> GetBookDetails(Book book)
        {
            if (book == null)
                throw new ArgumentNullException("book");
            if (book.Sysno == null)
                throw new ArgumentException("book");

            string url = CreateBookDetailsURL(book.Sysno);

            var details = await RequestManager.DownloadDataAsync<Book>(url);

            book.Publisher = details.Publisher;
            book.PublishedDate = details.PublishedDate;
            book.Language = details.Language;
            book.PageType = details.PageType;
            book.PageCount = details.PageCount;

            return book;
        }
Beispiel #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="book">book to wrap</param>
 public BookViewModel(Book book)
 {
     Book = book;            
 }