Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    PackageLoadParameters Class

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

    Parameters used for loading a package.

    System.Object → PackageLoadParameters
    Derived from PackageLoadParameters:

    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 true

    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 true

    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 true, unloadable objects will be removed, similar to RemoveUnloadableObjects.

    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.

    | Improve this Doc View Source

    Constructors


    PackageLoadParameters()

    Initializes a new instance of the PackageLoadParameters class.

    public PackageLoadParameters()
    | Improve this Doc View Source

    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>
    | Improve this Doc View Source

    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

    true if [automatic compile projects]; otherwise, false.


    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

    true if [automatic load assets]; otherwise, false.


    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

    true if [convert u path to absolute]; otherwise, false.


    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

    true if [load assembly references]; otherwise, false.


    LoadMissingDependencies

    Gets or sets a value indicating whether [load missing dependencies].

    public bool LoadMissingDependencies { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if [load missing dependencies]; otherwise, false.


    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
    | Improve this Doc View Source

    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.


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation