Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    PackageStore Class

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

    Manage packages locally installed and accessible on the store.

    System.Object → PackageStore
    Derived from PackageStore:

    public class PackageStore
    Remarks

    This class is the frontend to the packaging/distribution system. It is currently using nuget for its packaging but may change in the future.

    Name Description
    Properties
    Instance

    Gets the default package manager.

    Methods
    FindLocalPackage(String, PackageVersionRange, ConstraintProvider, Boolean, Boolean)
    GetPackageFileName(String, PackageVersionRange, ConstraintProvider, Boolean, Boolean)

    Gets the filename to the specific package packageName using the version versionRange if not null, otherwise the constraintProvider if specified. If no constraints are specified, the first entry if any are founds is used to get the filename.

    GetPackages()

    Gets the packages available online.

    GetPackageWithFileName(String)

    Gets the filename to the specific package using just a package name.

    PackageMetaFromNugetPackage(NugetPackage)

    New instance of PackageMeta from a nuget package metadata.

    ToNugetManifest(PackageMeta, ManifestMetadata)
    | Improve this Doc View Source

    Properties


    Instance

    Gets the default package manager.

    public static PackageStore Instance { get; }
    Property Value
    Type Description
    PackageStore

    A default instance.

    | Improve this Doc View Source

    Methods


    FindLocalPackage(String, PackageVersionRange, ConstraintProvider, Boolean, Boolean)

    public NugetLocalPackage FindLocalPackage(string packageName, PackageVersionRange versionRange = null, ConstraintProvider constraintProvider = null, bool allowPreleaseVersion = true, bool allowUnlisted = false)
    Parameters
    Type Name Description
    System.String packageName
    Stride.Core.PackageVersionRange versionRange
    Stride.Core.Packages.ConstraintProvider constraintProvider
    System.Boolean allowPreleaseVersion
    System.Boolean allowUnlisted
    Returns
    Type Description
    Stride.Core.Packages.NugetLocalPackage

    GetPackageFileName(String, PackageVersionRange, ConstraintProvider, Boolean, Boolean)

    Gets the filename to the specific package packageName using the version versionRange if not null, otherwise the constraintProvider if specified. If no constraints are specified, the first entry if any are founds is used to get the filename.

    public UFile GetPackageFileName(string packageName, PackageVersionRange versionRange = null, ConstraintProvider constraintProvider = null, bool allowPreleaseVersion = true, bool allowUnlisted = false)
    Parameters
    Type Name Description
    System.String packageName

    Name of the package.

    Stride.Core.PackageVersionRange versionRange

    The version range.

    Stride.Core.Packages.ConstraintProvider constraintProvider

    The package constraint provider.

    System.Boolean allowPreleaseVersion

    if set to true [allow prelease version].

    System.Boolean allowUnlisted

    if set to true [allow unlisted].

    Returns
    Type Description
    Stride.Core.IO.UFile

    A location on the disk to the specified package or null if not found.

    Exceptions
    Type Condition
    System.ArgumentNullException

    packageName


    GetPackages()

    Gets the packages available online.

    public async Task<IEnumerable<PackageMeta>> GetPackages()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PackageMeta>>

    IEnumerable<PackageMeta>.


    GetPackageWithFileName(String)

    Gets the filename to the specific package using just a package name.

    public UFile GetPackageWithFileName(string packageName)
    Parameters
    Type Name Description
    System.String packageName

    Name of the package.

    Returns
    Type Description
    Stride.Core.IO.UFile

    A location on the disk to the specified package or null if not found.

    Exceptions
    Type Condition
    System.ArgumentNullException

    packageName


    PackageMetaFromNugetPackage(NugetPackage)

    New instance of PackageMeta from a nuget package metadata.

    public static PackageMeta PackageMetaFromNugetPackage(NugetPackage metadata)
    Parameters
    Type Name Description
    Stride.Core.Packages.NugetPackage metadata

    The nuget metadata used to initialized an instance of PackageMeta.

    Returns
    Type Description
    PackageMeta

    ToNugetManifest(PackageMeta, ManifestMetadata)

    public static void ToNugetManifest(PackageMeta meta, ManifestMetadata manifestMeta)
    Parameters
    Type Name Description
    PackageMeta meta
    Stride.Core.Packages.ManifestMetadata manifestMeta

    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