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 SourceDelete(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. |
GetAll()
Gets all package definitions from storage.
Declaration
IEnumerable<PackageDefinition?> GetAll()
Returns
| Type | Description |
|---|---|
| IEnumerable<PackageDefinition> | An enumerable collection of all PackageDefinition instances. |
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, |
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, |
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 |
|