コード例 #1
0
        /// <summary>
        /// Save this storage to the repo
        /// </summary>
        /// <param name="repo">The repo to store</param>
        /// <exception cref="ArgumentNullException">Throws when repo is null</exception>
        public void SaveTo(IBookListStorage repo)
        {
            if (repo == null)
            {
                throw new ArgumentNullException($"{nameof(repo)} must be not null");
            }

            repo.WriteBooks(books);
        }