コード例 #1
0
        /// <summary>
        /// Remove book from file.
        /// </summary>
        /// <param name="removeBook">Book.</param>

        public void RemoveBook(Book removeBook)
        {
            try
            {
                ServiceBookLogger.Info("Start of block processing TYR in which remove book");
                ListService.RemoveBook(removeBook);
                ServiceBookLogger.Info("End of block processing TYR in which remove book");
            }
            catch (RemoveBookException ex)
            {
                Console.WriteLine(ex.Message);
                ServiceBookLogger.Info(ex.Message);
                ServiceBookLogger.Error(ex.StackTrace);
            }
        }
コード例 #2
0
        /// <summary>
        /// Add book in file.
        /// </summary>
        /// <param name="addBook">Book</param>

        public void AddBook(Book addBook)
        {
            try
            {
                ServiceBookLogger.Info("Start of block processing TYR in which adding books");
                ListService.AddBook(addBook);
                ServiceBookLogger.Info("End of block processing TYR in which adding books");
            }
            catch (AddBookException ex)
            {
                Console.WriteLine(ex.Message);
                ServiceBookLogger.Info(ex.Message);
                ServiceBookLogger.Error(ex.StackTrace);
            }
        }