Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IPackageDefinitionRepository

    Defines methods for persisting package definitions to storage.

    Namespace: Umbraco.Cms.Core.Packaging
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IPackageDefinitionRepository

    Methods

    View Source

    Delete(int)

    Deletes a package definition from storage.

    Declaration
    void Delete(int id)
    Parameters
    Type Name Description
    int id

    The identifier of the package definition to delete.

    View Source

    GetAll()

    Gets all package definitions from storage.

    Declaration
    IEnumerable<PackageDefinition?> GetAll()
    Returns
    Type Description
    IEnumerable<PackageDefinition>

    An enumerable collection of all PackageDefinition instances.

    View Source

    GetById(int)

    Gets a package definition by its integer identifier.

    Declaration
    PackageDefinition? GetById(int id)
    Parameters
    Type Name Description
    int id

    The identifier of the package definition.

    Returns
    Type Description
    PackageDefinition

    The PackageDefinition if found; otherwise, null.

    View Source

    GetByKey(Guid)

    Gets a package definition by its unique key.

    Declaration
    PackageDefinition? GetByKey(Guid key)
    Parameters
    Type Name Description
    Guid key

    The unique key of the package definition.

    Returns
    Type Description
    PackageDefinition

    The PackageDefinition if found; otherwise, null.

    View Source

    SavePackage(PackageDefinition)

    Persists a package definition to storage.

    Declaration
    bool SavePackage(PackageDefinition definition)
    Parameters
    Type Name Description
    PackageDefinition definition

    The package definition to save.

    Returns
    Type Description
    bool

    true if creating/updating the package was successful; otherwise, false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX