PackageLoadParameters Class
Namespace: Stride.Core.AssetsAssembly: Stride.Core.Assets.dll
Parameters used for loading a package.
public sealed class PackageLoadParameters
Name | Description | |
---|---|---|
Constructors | ||
PackageLoadParameters() | Initializes a new instance of the PackageLoadParameters class. |
|
Fields | ||
PackageUpgradeRequested | Occurs when one or more package upgrades are required for a single package. Returning false will cancel upgrades on this package. |
|
TemporaryAssetFilter | Occurs when an asset is about to be loaded, if false is returned the asset will be ignored and not loaded. |
|
Properties | ||
AssemblyContainer | Gets or sets the assembly container used to load assemblies referenced by the package. If null, will use the Stride.Core.Reflection.AssemblyContainer.Default |
|
AssetFiles | Gets or sets the asset files to load, if you want to not rely on the default ListAssetFiles(ILogger, Package, Boolean, Boolean, Nullable<CancellationToken>). |
|
AutoCompileProjects | Gets or sets a value indicating whether to automatically compile projects that don't have their assembly generated. |
|
AutoLoadTemporaryAssets | Gets or sets a value indicating whether to automatically load assets. Default is |
|
BuildConfiguration | Gets or sets the build configuration used to AutoCompileProjects. |
|
CancelToken | Gets or sets the cancelation token. |
|
ConvertUPathToAbsolute | Gets or sets a value indicating whether to convert all Stride.Core.IO.UPath to absolute paths when loading. Default
is |
|
ExtraCompileProperties | Gets or sets the extra compile properties, used when AutoCompileProjects is true. |
|
GenerateNewAssetIds | Gets or sets the generate new asset ids. |
|
LoadAssemblyReferences | Gets or sets a value indicating whether [load assembly references]. |
|
LoadMissingDependencies | Gets or sets a value indicating whether [load missing dependencies]. |
|
RemoveUnloadableObjects | If |
|
TemporaryAssetsInMsbuild | Gets a boolean telling if MSBuild files should be evaluated when listing assets. |
|
Methods | ||
Clone() | Clones this instance. |
|
Default() | Gets the default parameters. |
|
ShouldUpgrade(PackageUpgradeRequestedAnswer) | Indicates if the given value of PackageUpgradeRequestedAnswer should trigger an upgrade. |
Constructors
PackageLoadParameters()
Initializes a new instance of the PackageLoadParameters class.
public PackageLoadParameters()
Fields
PackageUpgradeRequested
Occurs when one or more package upgrades are required for a single package. Returning false will cancel upgrades on this package.
public Func<Package, IList<PackageSession.PendingPackageUpgrade>, PackageUpgradeRequestedAnswer> PackageUpgradeRequested
Field Value
Type | Description |
---|---|
System.Func<Package, System.Collections.Generic.IList<PackageSession.PendingPackageUpgrade>, PackageUpgradeRequestedAnswer> |
TemporaryAssetFilter
Occurs when an asset is about to be loaded, if false is returned the asset will be ignored and not loaded.
public Func<PackageLoadingAssetFile, bool> TemporaryAssetFilter
Field Value
Type | Description |
---|---|
System.Func<PackageLoadingAssetFile, System.Boolean> |
Properties
AssemblyContainer
Gets or sets the assembly container used to load assemblies referenced by the package. If null, will use the Stride.Core.Reflection.AssemblyContainer.Default
public AssemblyContainer AssemblyContainer { get; set; }
Property Value
Type | Description |
---|---|
Stride.Core.Reflection.AssemblyContainer | The assembly container. |
AssetFiles
Gets or sets the asset files to load, if you want to not rely on the default ListAssetFiles(ILogger, Package, Boolean, Boolean, Nullable<CancellationToken>).
public List<PackageLoadingAssetFile> AssetFiles { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<PackageLoadingAssetFile> | The load asset files. |
AutoCompileProjects
Gets or sets a value indicating whether to automatically compile projects that don't have their assembly generated.
public bool AutoCompileProjects { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AutoLoadTemporaryAssets
Gets or sets a value indicating whether to automatically load assets. Default is true
public bool AutoLoadTemporaryAssets { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
BuildConfiguration
Gets or sets the build configuration used to AutoCompileProjects.
public string BuildConfiguration { get; set; }
Property Value
Type | Description |
---|---|
System.String | The build configuration. |
CancelToken
Gets or sets the cancelation token.
public CancellationToken? CancelToken { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Threading.CancellationToken> | The cancel token. |
ConvertUPathToAbsolute
Gets or sets a value indicating whether to convert all Stride.Core.IO.UPath to absolute paths when loading. Default
is true
public bool ConvertUPathToAbsolute { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ExtraCompileProperties
Gets or sets the extra compile properties, used when AutoCompileProjects is true.
public Dictionary<string, string> ExtraCompileProperties { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | The extra compile parameters. |
GenerateNewAssetIds
Gets or sets the generate new asset ids.
public bool GenerateNewAssetIds { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The generate new asset ids. |
Remarks
Only makes sense for AddExistingProject(UFile, ILogger, PackageLoadParameters).
LoadAssemblyReferences
Gets or sets a value indicating whether [load assembly references].
public bool LoadAssemblyReferences { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
LoadMissingDependencies
Gets or sets a value indicating whether [load missing dependencies].
public bool LoadMissingDependencies { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
RemoveUnloadableObjects
If true
, unloadable objects will be removed, similar to RemoveUnloadableObjects.
public bool RemoveUnloadableObjects { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TemporaryAssetsInMsbuild
Gets a boolean telling if MSBuild files should be evaluated when listing assets.
public bool TemporaryAssetsInMsbuild { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Clone()
Clones this instance.
public PackageLoadParameters Clone()
Returns
Type | Description |
---|---|
PackageLoadParameters | PackageLoadParameters. |
Default()
Gets the default parameters.
public static PackageLoadParameters Default()
Returns
Type | Description |
---|---|
PackageLoadParameters | PackageLoadParameters. |
ShouldUpgrade(PackageUpgradeRequestedAnswer)
Indicates if the given value of PackageUpgradeRequestedAnswer should trigger an upgrade.
public static bool ShouldUpgrade(PackageUpgradeRequestedAnswer answer)
Parameters
Type | Name | Description |
---|---|---|
PackageUpgradeRequestedAnswer | answer | The value to evaluate. |
Returns
Type | Description |
---|---|
System.Boolean | True if it should trigger an upgrade, false otherwise. |