Table of Contents

Class PackageUpgrader

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

Offers a way for package to upgrade dependent packages. For example, if you write package A and Game1 depends on it, you might want to offer a new version of package A that would automatically perform some upgrades on Game1.

public abstract class PackageUpgrader
Inheritance
PackageUpgrader

Properties

Attribute

public PackageUpgraderAttribute Attribute { get; }

Property Value

PackageUpgraderAttribute

Methods

Upgrade(PackageLoadParameters, PackageSession, ILogger, Package, PackageDependency, Package, IList<PackageLoadingAssetFile>)

Performs the package migration, before assets are loaded

public abstract bool Upgrade(PackageLoadParameters loadParameters, PackageSession session, ILogger log, Package dependentPackage, PackageDependency dependency, Package dependencyPackage, IList<PackageLoadingAssetFile> assetFiles)

Parameters

loadParameters PackageLoadParameters

The load parameters.

session PackageSession

The session.

log ILogger

The log.

dependentPackage Package

The source package.

dependency PackageDependency

The dependency.

dependencyPackage Package

The dependency package.

assetFiles IList<PackageLoadingAssetFile>

The asset files.

Returns

bool

UpgradeAfterAssetsLoaded(PackageLoadParameters, PackageSession, ILogger, Package, PackageDependency, Package, PackageVersionRange)

Performs the second step of package migration, after assets have been loaded.

public virtual bool UpgradeAfterAssetsLoaded(PackageLoadParameters loadParameters, PackageSession session, ILogger log, Package dependentPackage, PackageDependency dependency, Package dependencyPackage, PackageVersionRange dependencyVersionBeforeUpdate)

Parameters

loadParameters PackageLoadParameters

The load parameters.

session PackageSession

The session.

log ILogger

The log.

dependentPackage Package

The source package.

dependency PackageDependency

The dependency.

dependencyPackage Package

The dependency package.

dependencyVersionBeforeUpdate PackageVersionRange

The version before the update.

Returns

bool

UpgradeBeforeAssembliesLoaded(PackageLoadParameters, PackageSession, ILogger, Package, PackageDependency, Package)

Performs a preprocessing step of package migration, before assembly references are loaded.

public virtual bool UpgradeBeforeAssembliesLoaded(PackageLoadParameters loadParameters, PackageSession session, ILogger log, Package dependentPackage, PackageDependency dependency, Package dependencyPackage)

Parameters

loadParameters PackageLoadParameters

The load parameters.

session PackageSession

The session.

log ILogger

The log.

dependentPackage Package

The source package.

dependency PackageDependency

The dependency.

dependencyPackage Package

The dependency package.

Returns

bool