コード例 #1
0
 public void SetCoverImage(Book book, string imagePath)
 {
     if (book == null)
     {
         throw new ArgumentNullException("Book cannot be null.");
     }
     book.SetCoverImage(imagePath);
 }
コード例 #2
0
 public void DisplayBook(Book book, StringBuilder sb)
 {
     if (book == null)
     {
         throw new ArgumentNullException("Book cannot be null.");
     }
     sb.AppendLine(book.Title);
     var coverImage = book.GetCoverImage();
     sb.AppendLine("Cover Image: " + coverImage.ImagePath);
     foreach (var image in book.ReadOnlyImages)
     {
         sb.AppendLine(image.ImagePath);
     }
 }