PackageUpgrader Class
Namespace: Stride.Core.AssetsAssembly: 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
Name | Description | |
---|---|---|
Properties | ||
Attribute | ||
Methods | ||
Upgrade(PackageLoadParameters, PackageSession, ILogger, Package, PackageDependency, Package, IList<PackageLoadingAssetFile>) | Performs the package migration, before assets are loaded |
|
UpgradeAfterAssetsLoaded(PackageLoadParameters, PackageSession, ILogger, Package, PackageDependency, Package, PackageVersionRange) | Performs the second step of package migration, after assets have been loaded. |
|
UpgradeBeforeAssembliesLoaded(PackageLoadParameters, PackageSession, ILogger, Package, PackageDependency, Package) | Performs a preprocessing step of package migration, before assembly references are loaded. |
Properties
Attribute
public PackageUpgraderAttribute Attribute { get; }
Property Value
Type | Description |
---|---|
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
Type | Name | Description |
---|---|---|
PackageLoadParameters | loadParameters | The load parameters. |
PackageSession | session | The session. |
ILogger | log | The log. |
Package | dependentPackage | The source package. |
PackageDependency | dependency | The dependency. |
Package | dependencyPackage | The dependency package. |
System.Collections.Generic.IList<PackageLoadingAssetFile> | assetFiles | The asset files. |
Returns
Type | Description |
---|---|
System.Boolean |
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
Type | Name | Description |
---|---|---|
PackageLoadParameters | loadParameters | The load parameters. |
PackageSession | session | The session. |
ILogger | log | The log. |
Package | dependentPackage | The source package. |
PackageDependency | dependency | The dependency. |
Package | dependencyPackage | The dependency package. |
Stride.Core.PackageVersionRange | dependencyVersionBeforeUpdate | The version before the update. |
Returns
Type | Description |
---|---|
System.Boolean |
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
Type | Name | Description |
---|---|---|
PackageLoadParameters | loadParameters | The load parameters. |
PackageSession | session | The session. |
ILogger | log | The log. |
Package | dependentPackage | The source package. |
PackageDependency | dependency | The dependency. |
Package | dependencyPackage | The dependency package. |
Returns
Type | Description |
---|---|
System.Boolean |