src/NuGetGallery.Core/Services/CoreReadmeFileService.cs
/// <summary>
/// Saves the package readme.md file to storage. This method should throw if the package
/// does not have an embedded readme file 
/// </summary>
/// <param name="package">The package associated with the readme.</param>
/// <param name="readmeFile">The content of readme file.</param>
Saves the package readme.md file to storage. This method should throw if the package
does not have an embedded readme file
Saves the package readme . md file to storage . This method should throw if the package does not have an embedded readme file
private Task SaveReadmeFileAsync(Package package, Stream readmeFile)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }
            if (readmeFile == null)
            {
                throw new ArgumentNullException(nameof(readmeFile));
            }
            if (package.EmbeddedReadmeType == EmbeddedReadmeFileType.Absent)
            {
                throw new ArgumentException("Package must have an embedded readme", nameof(package));
            }
            var fileName = BuildReadmeFileName(package);
            return _fileStorageService.SaveFileAsync(_metadata.PackageContentFolderName, fileName, readmeFile, overwrite: true);
        }
private Task SaveReadmeFileAsync ( Package package , Stream readmeFile ) { if ( package == null ) { throw new ArgumentNullException ( nameof ( package ) ) ; } if ( readmeFile == null ) { throw new ArgumentNullException ( nameof ( readmeFile ) ) ; } if ( package . EmbeddedReadmeType == EmbeddedReadmeFileType . Absent ) { throw new ArgumentException ( " " , nameof ( package ) ) ; } var fileName = BuildReadmeFileName ( package ) ; return _fileStorageService . SaveFileAsync ( _metadata . PackageContentFolderName , fileName , readmeFile , overwrite : true ) ; }
Saves the package readme.md file to storage.
Saves the package readme . md file to storage .
package
Package
The package associated with the readme.
The package associated with the readme .
readmeFile
Stream
The content of readme file.
The content of readme file .