/// <summary> /// Loads from storage. /// </summary> /// <param name="storage">The storage.</param> /// <exception cref="ArgumentNullException">storage</exception> public void LoadFromStorage(IBookListStorage storage) { Logger.Info($"Loading from storage!"); if (ReferenceEquals(storage, null)) { throw new ArgumentNullException($"{nameof(storage)} is null"); } BookList = storage.LoadFromStorage(); Logger.Info($"Loading from storage completed!"); }
/// <summary> /// Gets a list with all the books in storage /// </summary> /// <returns>list with all books</returns> public List <Book> GetAllBooks() { logger.Debug("Get list books"); return(storage.LoadFromStorage()); }