Interface IPackageInstallation
Defines methods for installing Umbraco packages.
Namespace: Umbraco.Cms.Core.Packaging
Assembly: Umbraco.Core.dll
Syntax
public interface IPackageInstallation
Methods
View SourceInstallPackageData(CompiledPackage, int, out PackageDefinition)
Installs a package's data and entities.
Declaration
InstallationSummary InstallPackageData(CompiledPackage compiledPackage, int userId, out PackageDefinition packageDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| CompiledPackage | compiledPackage | The compiled package containing the data to install. |
| int | userId | The identifier of the user performing the installation. |
| PackageDefinition | packageDefinition | When this method returns, contains the package definition created during installation. |
Returns
| Type | Description |
|---|---|
| InstallationSummary | An InstallationSummary containing details about what was installed. |
Remarks
The resulting PackageDefinition is only if we wanted to persist what was saved during package data installation. This used to be for the installedPackages.config but we don't have that anymore and don't really want it if we can help it. Possibly, we could continue to persist that file so that you could uninstall package data for an installed package in the back office (but it won't actually uninstall the package until you do that via NuGet). If we want that functionality we'll have to restore a bunch of deleted code.
ReadPackage(XDocument?)
Reads the package XML and returns the CompiledPackage model.
Declaration
CompiledPackage ReadPackage(XDocument? packageXmlFile)
Parameters
| Type | Name | Description |
|---|---|---|
| XDocument | packageXmlFile | The XML document containing the package definition. |
Returns
| Type | Description |
|---|---|
| CompiledPackage | A CompiledPackage model representing the package. |