private static MemoryStream GeneratePackageAsync(string licenseFileName = null, string licenseExpression = null, bool saveLicenseFile = true) { return(PackageServiceUtility.CreateNuGetPackageStream( licenseExpression: licenseExpression, licenseFilename: licenseFileName, licenseFileContents: licenseFileName != null && saveLicenseFile ? LicenseFileContents : null)); }
protected static MemoryStream GeneratePackageStream( string version = "1.2.3-alpha.0", RepositoryMetadata repositoryMetadata = null, bool isSigned = true, int?desiredTotalEntryCount = null, Func <string> getCustomNuspecNodes = null, Uri iconUrl = null, Uri licenseUrl = null, string licenseExpression = null, string licenseFilename = null, string licenseFileContents = null, byte[] licenseFileBinaryContents = null, string iconFilename = null, byte[] iconFileBinaryContents = null, IReadOnlyList <string> entryNames = null) { return(PackageServiceUtility.CreateNuGetPackageStream( id: PackageId, version: version, repositoryMetadata: repositoryMetadata, isSigned: isSigned, desiredTotalEntryCount: desiredTotalEntryCount, getCustomNuspecNodes: getCustomNuspecNodes, licenseUrl: licenseUrl, iconUrl: iconUrl, licenseExpression: licenseExpression, licenseFilename: licenseFilename, licenseFileContents: GetBinaryLicenseFileContents(licenseFileBinaryContents, licenseFileContents), iconFilename: iconFilename, iconFileBinaryContents: iconFileBinaryContents, entryNames: entryNames)); }
private MemoryStream CreateSymbolPackageStreamWithEntries(string[] entryNames) { var packageType = new NuGet.Packaging.Core.PackageType(name: "SymbolsPackage", version: NuGet.Packaging.Core.PackageType.EmptyVersion); var packageTypes = new List <NuGet.Packaging.Core.PackageType>() { packageType }; return(PackageServiceUtility.CreateNuGetPackageStream(packageTypes: packageTypes, entryNames: entryNames)); }
private Mock <TestPackageReader> GeneratePackage(IReadOnlyList <string> entryNames) { var packageStream = PackageServiceUtility.CreateNuGetPackageStream(entryNames: entryNames); return(PackageServiceUtility.CreateNuGetPackage(packageStream)); }
private static MemoryStream GeneratePackageWithReadmeFile(string readmeFileName = null, bool saveReadmeFile = true) { return(PackageServiceUtility.CreateNuGetPackageStream( readmeFilename: readmeFileName, readmeFileContents: readmeFileName != null && saveReadmeFile ? ReadmeFileContents : null)); }