/// <summary> /// Reads the books. /// </summary> /// <param name="storage">The storage.</param> /// <returns> /// Copy of current collection /// </returns> /// <exception cref="ArgumentNullException">storage</exception> /// <exception cref="CustomException">There is no such storage</exception> /// <exception cref="StackTrace"></exception> public IEnumerable <Book> ReadBooks(IStogare storage) { if (storage == null) { throw new ArgumentNullException($"{nameof(storage)} is null"); } try { this.books = storage.ReadBooks(); } catch (IOException e) { logger.Log(e, e.Message, LogLevel.Fatal); throw new CustomException(e, new StackTrace(e), "There is no such storage"); } return(this.books.ToList()); }