Table of Contents

Class PackageStore

Namespace
Stride.Core.Assets
Assembly
Stride.Core.Assets.dll

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 string
versionRange PackageVersionRange
constraintProvider ConstraintProvider
allowPreleaseVersion bool
allowUnlisted 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 string

Name of the package.

versionRange PackageVersionRange

The version range.

constraintProvider ConstraintProvider

The package constraint provider.

allowPreleaseVersion bool

if set to true [allow prelease version].

allowUnlisted bool

if 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 string

Name 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 NugetPackage

The nuget metadata used to initialized an instance of PackageMeta.

Returns

PackageMeta

ToNugetManifest(PackageMeta, ManifestMetadata)

public static void ToNugetManifest(PackageMeta meta, ManifestMetadata manifestMeta)

Parameters

meta PackageMeta
manifestMeta ManifestMetadata