From d49aa19b29a14cf4f1f6eb46995ac9de542164b0 Mon Sep 17 00:00:00 2001 From: ldv Date: Mon, 29 Jan 2024 22:12:41 +0300 Subject: [PATCH] Fix missing using on console application and path to book file. Fix book Annotation and Language options. --- samples/FBLibrary.Sample.ConsoleApp/Program.cs | 6 ++++-- src/HeaderItems/ItemTitleInfo.cs | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/samples/FBLibrary.Sample.ConsoleApp/Program.cs b/samples/FBLibrary.Sample.ConsoleApp/Program.cs index 119cebc..253e7ed 100644 --- a/samples/FBLibrary.Sample.ConsoleApp/Program.cs +++ b/samples/FBLibrary.Sample.ConsoleApp/Program.cs @@ -1,10 +1,12 @@ -using System.Drawing; +using System; +using System.Drawing; using System.Drawing.Imaging; +using System.IO; using System.Xml; using FB2Library; using FB2Library.Elements; -var filePath = Path.Combine("..", "..", "..", "..", "files", "test.fb2"); +var filePath = Path.Combine("..", "..", "..", "..", "..", "files", "test.fb2"); await using var fileStream = new FileStream(filePath, FileMode.Open); var readerSettings = new XmlReaderSettings diff --git a/src/HeaderItems/ItemTitleInfo.cs b/src/HeaderItems/ItemTitleInfo.cs index 30e4e93..8fa27d9 100644 --- a/src/HeaderItems/ItemTitleInfo.cs +++ b/src/HeaderItems/ItemTitleInfo.cs @@ -56,7 +56,7 @@ public class ItemTitleInfo : ItemInfoBase /// /// Book's annotation /// - public AnnotationItem Annotation { set; private get; } + public AnnotationItem Annotation { get; private set; } /// /// Book date , can be a range like 1990-1991 @@ -66,7 +66,7 @@ public class ItemTitleInfo : ItemInfoBase /// /// Book's language /// - public string Language { set; private get; } + public string Language { get; private set; } public CoverPage Cover { get; private set; } @@ -204,7 +204,7 @@ public void Load(XElement xTitleInfo) } else { - Debug.WriteLine("Language not specified in title section"); + Debug.WriteLine("Language not specified in title section"); } // Load source language