/// <summary> /// Get package ReadMe markdown from storage. /// </summary> /// <param name="package">Package entity associated with the ReadMe.</param> /// <returns>ReadMe markdown from storage.</returns> public async Task <string> GetReadMeMdAsync(Package package) { if (package.HasReadMe) { return(await _packageFileService.DownloadReadMeMdFileAsync(package)); } return(null); }
/// <summary> /// Get package ReadMe markdown from storage. /// </summary> /// <param name="package">Package entity associated with the ReadMe.</param> /// <param name="isPending">Whether to retrieve the pending ReadMe.</param> /// <returns>Pending or active ReadMe markdown from storage.</returns> public async Task <string> GetReadMeMdAsync(Package package, bool isPending = false) { if (package.HasReadMe || isPending) { return(await _packageFileService.DownloadReadMeMdFileAsync(package, isPending)); } return(null); }