Table of Contents

Class PackageBuilder

Namespace
NuGet.Packaging
Assembly
Chocolatey.NuGet.Packaging.dll
public class PackageBuilder : IPackageMetadata
Inheritance
PackageBuilder
Implements
Inherited Members

Constructors

PackageBuilder()

public PackageBuilder()

PackageBuilder(bool)

public PackageBuilder(bool deterministic)

Parameters

deterministic bool

PackageBuilder(bool, ILogger)

public PackageBuilder(bool deterministic, ILogger logger)

Parameters

deterministic bool
logger ILogger

PackageBuilder(Stream, string)

public PackageBuilder(Stream stream, string basePath)

Parameters

stream Stream
basePath string

PackageBuilder(Stream, string, Func<string, string>)

public PackageBuilder(Stream stream, string basePath, Func<string, string> propertyProvider)

Parameters

stream Stream
basePath string
propertyProvider Func<string, string>

PackageBuilder(string, Func<string, string>, bool)

public PackageBuilder(string path, Func<string, string> propertyProvider, bool includeEmptyDirectories)

Parameters

path string
propertyProvider Func<string, string>
includeEmptyDirectories bool

PackageBuilder(string, Func<string, string>, bool, bool)

public PackageBuilder(string path, Func<string, string> propertyProvider, bool includeEmptyDirectories, bool deterministic)

Parameters

path string
propertyProvider Func<string, string>
includeEmptyDirectories bool
deterministic bool

PackageBuilder(string, Func<string, string>, bool, bool, ILogger)

public PackageBuilder(string path, Func<string, string> propertyProvider, bool includeEmptyDirectories, bool deterministic, ILogger logger)

Parameters

path string
propertyProvider Func<string, string>
includeEmptyDirectories bool
deterministic bool
logger ILogger

PackageBuilder(string, string, Func<string, string>, bool)

public PackageBuilder(string path, string basePath, Func<string, string> propertyProvider, bool includeEmptyDirectories)

Parameters

path string
basePath string
propertyProvider Func<string, string>
includeEmptyDirectories bool

PackageBuilder(string, string, Func<string, string>, bool, bool)

public PackageBuilder(string path, string basePath, Func<string, string> propertyProvider, bool includeEmptyDirectories, bool deterministic)

Parameters

path string
basePath string
propertyProvider Func<string, string>
includeEmptyDirectories bool
deterministic bool

PackageBuilder(string, string, Func<string, string>, bool, bool, ILogger)

public PackageBuilder(string path, string basePath, Func<string, string> propertyProvider, bool includeEmptyDirectories, bool deterministic, ILogger logger)

Parameters

path string
basePath string
propertyProvider Func<string, string>
includeEmptyDirectories bool
deterministic bool
logger ILogger

Fields

MaxIconFileSize

Maximum Icon file size: 1 megabyte

public const int MaxIconFileSize = 1048576

Field Value

int

Properties

Authors

public ISet<string> Authors { get; }

Property Value

ISet<string>

BugTrackerUrl

public Uri BugTrackerUrl { get; set; }

Property Value

Uri

Conflicts

public ISet<string> Conflicts { get; set; }

Property Value

ISet<string>

ContentFiles

ContentFiles section from the manifest for content v2

public ICollection<ManifestContentFiles> ContentFiles { get; }

Property Value

ICollection<ManifestContentFiles>
public string Copyright { get; set; }

Property Value

string

DependencyGroups

public Collection<PackageDependencyGroup> DependencyGroups { get; }

Property Value

Collection<PackageDependencyGroup>

Description

public string Description { get; set; }

Property Value

string

DevelopmentDependency

public bool DevelopmentDependency { get; set; }

Property Value

bool

DocsUrl

public Uri DocsUrl { get; set; }

Property Value

Uri

EmitRequireLicenseAcceptance

public bool EmitRequireLicenseAcceptance { get; set; }

Property Value

bool

Files

public ICollection<IPackageFile> Files { get; }

Property Value

ICollection<IPackageFile>

FrameworkReferenceGroups

public Collection<FrameworkReferenceGroup> FrameworkReferenceGroups { get; }

Property Value

Collection<FrameworkReferenceGroup>

FrameworkReferences

public Collection<FrameworkAssemblyReference> FrameworkReferences { get; }

Property Value

Collection<FrameworkAssemblyReference>

HasSnapshotVersion

public bool HasSnapshotVersion { get; set; }

Property Value

bool

Icon

public string Icon { get; set; }

Property Value

string

IconUrl

public Uri IconUrl { get; set; }

Property Value

Uri

Id

public string Id { get; set; }

Property Value

string

Language

public string Language { get; set; }

Property Value

string

LicenseMetadata

public LicenseMetadata LicenseMetadata { get; set; }

Property Value

LicenseMetadata

LicenseUrl

public Uri LicenseUrl { get; set; }

Property Value

Uri

MailingListUrl

public Uri MailingListUrl { get; set; }

Property Value

Uri

MinClientVersion

public Version MinClientVersion { get; set; }

Property Value

Version

OutputName

public string OutputName { get; set; }

Property Value

string

Owners

public ISet<string> Owners { get; }

Property Value

ISet<string>

PackageAssemblyReferences

public ICollection<PackageReferenceSet> PackageAssemblyReferences { get; set; }

Property Value

ICollection<PackageReferenceSet>

PackageSourceUrl

public Uri PackageSourceUrl { get; set; }

Property Value

Uri

PackageTypes

public ICollection<PackageType> PackageTypes { get; set; }

Property Value

ICollection<PackageType>

ProjectSourceUrl

public Uri ProjectSourceUrl { get; set; }

Property Value

Uri

ProjectUrl

public Uri ProjectUrl { get; set; }

Property Value

Uri

Properties

Exposes the additional properties extracted by the metadata extractor or received from the command line.

public Dictionary<string, string> Properties { get; }

Property Value

Dictionary<string, string>

Provides

public ISet<string> Provides { get; set; }

Property Value

ISet<string>

Readme

public string Readme { get; set; }

Property Value

string

ReleaseNotes

public string ReleaseNotes { get; set; }

Property Value

string

Replaces

public ISet<string> Replaces { get; set; }

Property Value

ISet<string>

Repository

public RepositoryMetadata Repository { get; set; }

Property Value

RepositoryMetadata

RequireLicenseAcceptance

public bool RequireLicenseAcceptance { get; set; }

Property Value

bool

Serviceable

public bool Serviceable { get; set; }

Property Value

bool

SoftwareDisplayName

public string SoftwareDisplayName { get; set; }

Property Value

string

SoftwareDisplayVersion

public string SoftwareDisplayVersion { get; set; }

Property Value

string

Summary

public string Summary { get; set; }

Property Value

string

Tags

public ISet<string> Tags { get; }

Property Value

ISet<string>

TargetFrameworks

public IList<NuGetFramework> TargetFrameworks { get; set; }

Property Value

IList<NuGetFramework>

Title

public string Title { get; set; }

Property Value

string

Version

public NuGetVersion Version { get; set; }

Property Value

NuGetVersion

WikiUrl

public Uri WikiUrl { get; set; }

Property Value

Uri

Methods

AddFiles(string, string, string, string)

public void AddFiles(string basePath, string source, string destination, string exclude = null)

Parameters

basePath string
source string
destination string
exclude string

Populate(ManifestMetadata)

public void Populate(ManifestMetadata manifestMetadata)

Parameters

manifestMetadata ManifestMetadata

PopulateFiles(string, IEnumerable<ManifestFile>)

public void PopulateFiles(string basePath, IEnumerable<ManifestFile> files)

Parameters

basePath string
files IEnumerable<ManifestFile>

Save(Stream)

public void Save(Stream stream)

Parameters

stream Stream

ValidateReferenceAssemblies(IEnumerable<IPackageFile>, IEnumerable<PackageReferenceSet>)

public static void ValidateReferenceAssemblies(IEnumerable<IPackageFile> files, IEnumerable<PackageReferenceSet> packageAssemblyReferences)

Parameters

files IEnumerable<IPackageFile>
packageAssemblyReferences IEnumerable<PackageReferenceSet>