Class PackageUpgrader
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
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
PackageLoadParametersThe load parameters.
session
PackageSessionThe session.
log
ILoggerThe log.
dependentPackage
PackageThe source package.
dependency
PackageDependencyThe dependency.
dependencyPackage
PackageThe dependency package.
assetFiles
IList<PackageLoadingAssetFile>The asset files.
Returns
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
PackageLoadParametersThe load parameters.
session
PackageSessionThe session.
log
ILoggerThe log.
dependentPackage
PackageThe source package.
dependency
PackageDependencyThe dependency.
dependencyPackage
PackageThe dependency package.
dependencyVersionBeforeUpdate
PackageVersionRangeThe version before the update.
Returns
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
PackageLoadParametersThe load parameters.
session
PackageSessionThe session.
log
ILoggerThe log.
dependentPackage
PackageThe source package.
dependency
PackageDependencyThe dependency.
dependencyPackage
PackageThe dependency package.