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
packageNamestringversionRangePackageVersionRangeconstraintProviderConstraintProviderallowPreleaseVersionboolallowUnlistedbool
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
packageNamestringName of the package.
versionRangePackageVersionRangeThe version range.
constraintProviderConstraintProviderThe package constraint provider.
allowPreleaseVersionboolif set to
true[allow prelease version].allowUnlistedboolif 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
packageNamestringName 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
metadataNugetPackageThe nuget metadata used to initialized an instance of PackageMeta.
Returns
ToNugetManifest(PackageMeta, ManifestMetadata)
public static void ToNugetManifest(PackageMeta meta, ManifestMetadata manifestMeta)
Parameters
metaPackageMetamanifestMetaManifestMetadata