Class PackageStore
Manage packages locally installed and accessible on the store.
public class PackageStore
- Inheritance
-
PackageStore
Remarks
This class is the frontend to the packaging/distribution system. It is currently using nuget for its packaging but may change in the future.
Properties
Instance
Gets the default package manager.
public static PackageStore Instance { get; }
Property Value
- PackageStore
A default instance.
Methods
FindLocalPackage(string, PackageVersionRange, ConstraintProvider, bool, bool)
public NugetLocalPackage FindLocalPackage(string packageName, PackageVersionRange versionRange = null, ConstraintProvider constraintProvider = null, bool allowPreleaseVersion = true, bool allowUnlisted = false)
Parameters
packageName
stringversionRange
PackageVersionRangeconstraintProvider
ConstraintProviderallowPreleaseVersion
boolallowUnlisted
bool
Returns
- NugetLocalPackage
GetPackageFileName(string, PackageVersionRange, ConstraintProvider, bool, bool)
Gets the filename to the specific package packageName
using the version versionRange
if not null, otherwise the constraintProvider
if specified.
If no constraints are specified, the first entry if any are founds is used to get the filename.
public UFile GetPackageFileName(string packageName, PackageVersionRange versionRange = null, ConstraintProvider constraintProvider = null, bool allowPreleaseVersion = true, bool allowUnlisted = false)
Parameters
packageName
stringName of the package.
versionRange
PackageVersionRangeThe version range.
constraintProvider
ConstraintProviderThe package constraint provider.
allowPreleaseVersion
boolif set to
true
[allow prelease version].allowUnlisted
boolif set to
true
[allow unlisted].
Returns
- UFile
A location on the disk to the specified package or null if not found.
Exceptions
- ArgumentNullException
packageName
GetPackageWithFileName(string)
Gets the filename to the specific package using just a package name.
public UFile GetPackageWithFileName(string packageName)
Parameters
packageName
stringName of the package.
Returns
- UFile
A location on the disk to the specified package or null if not found.
Exceptions
- ArgumentNullException
packageName
GetPackages()
Gets the packages available online.
public Task<IEnumerable<PackageMeta>> GetPackages()
Returns
- Task<IEnumerable<PackageMeta>>
IEnumerable<PackageMeta>.
PackageMetaFromNugetPackage(NugetPackage)
New instance of PackageMeta from a nuget package metadata
.
public static PackageMeta PackageMetaFromNugetPackage(NugetPackage metadata)
Parameters
metadata
NugetPackageThe nuget metadata used to initialized an instance of PackageMeta.
Returns
ToNugetManifest(PackageMeta, ManifestMetadata)
public static void ToNugetManifest(PackageMeta meta, ManifestMetadata manifestMeta)
Parameters
meta
PackageMetamanifestMeta
ManifestMetadata