View Source
Class PackagingService
Represents the Packaging Service, which provides import/export functionality for the Core models of the API
using xml representation. This is primarily used by the Package functionality.
Inheritance
System.Object
Assembly: Umbraco.Infrastructure.dll
Syntax
public class PackagingService : IPackagingService, IService
Constructors
View Source
PackagingService(IAuditService, ICreatedPackagesRepository, IPackageInstallation, IEventAggregator, IKeyValueService, ICoreScopeProvider, PackageMigrationPlanCollection, IHostEnvironment, IUserService)
Declaration
public PackagingService(IAuditService auditService, ICreatedPackagesRepository createdPackages, IPackageInstallation packageInstallation, IEventAggregator eventAggregator, IKeyValueService keyValueService, ICoreScopeProvider coreScopeProvider, PackageMigrationPlanCollection packageMigrationPlans, IHostEnvironment hostEnvironment, IUserService userService)
Parameters
View Source
PackagingService(IAuditService, ICreatedPackagesRepository, IPackageInstallation, IEventAggregator, IKeyValueService, ICoreScopeProvider, PackageMigrationPlanCollection, IPackageManifestReader, IHostEnvironment, IUserService)
Declaration
public PackagingService(IAuditService auditService, ICreatedPackagesRepository createdPackages, IPackageInstallation packageInstallation, IEventAggregator eventAggregator, IKeyValueService keyValueService, ICoreScopeProvider coreScopeProvider, PackageMigrationPlanCollection packageMigrationPlans, IPackageManifestReader packageManifestReader, IHostEnvironment hostEnvironment, IUserService userService)
Parameters
Methods
View Source
CreateCreatedPackageAsync(PackageDefinition, Guid)
Declaration
public async Task<Attempt<PackageDefinition, PackageOperationStatus>> CreateCreatedPackageAsync(PackageDefinition package, Guid userKey)
Parameters
Returns
View Source
DeleteCreatedPackage(Int32, Int32)
Declaration
public void DeleteCreatedPackage(int id, int userId = -1)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Int32 |
userId |
|
View Source
DeleteCreatedPackageAsync(Guid, Guid)
Declaration
public async Task<Attempt<PackageDefinition, PackageOperationStatus>> DeleteCreatedPackageAsync(Guid key, Guid userKey)
Parameters
Type |
Name |
Description |
Guid |
key |
|
Guid |
userKey |
|
Returns
View Source
ExportCreatedPackage(PackageDefinition)
Declaration
public string ExportCreatedPackage(PackageDefinition definition)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
GetAllCreatedPackages()
Declaration
public IEnumerable<PackageDefinition> GetAllCreatedPackages()
Returns
View Source
GetAllInstalledPackages()
Declaration
public IEnumerable<InstalledPackage> GetAllInstalledPackages()
Returns
View Source
GetAllInstalledPackagesAsync()
Declaration
public async Task<IEnumerable<InstalledPackage>> GetAllInstalledPackagesAsync()
Returns
View Source
GetCompiledPackageInfo(XDocument)
Declaration
public CompiledPackage GetCompiledPackageInfo(XDocument xml)
Parameters
Type |
Name |
Description |
System.Xml.Linq.XDocument |
xml |
|
Returns
View Source
GetCreatedPackageById(Int32)
Declaration
public PackageDefinition GetCreatedPackageById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
GetCreatedPackageByKeyAsync(Guid)
Declaration
public Task<PackageDefinition> GetCreatedPackageByKeyAsync(Guid key)
Parameters
Type |
Name |
Description |
Guid |
key |
|
Returns
View Source
GetCreatedPackagesAsync(Int32, Int32)
Declaration
public async Task<PagedModel<PackageDefinition>> GetCreatedPackagesAsync(int skip, int take)
Parameters
Type |
Name |
Description |
System.Int32 |
skip |
|
System.Int32 |
take |
|
Returns
View Source
GetInstalledPackageByName(String)
Declaration
public InstalledPackage GetInstalledPackageByName(string packageName)
Parameters
Type |
Name |
Description |
System.String |
packageName |
|
Returns
View Source
GetInstalledPackagesFromMigrationPlansAsync(Int32, Int32)
Declaration
public Task<PagedModel<InstalledPackage>> GetInstalledPackagesFromMigrationPlansAsync(int skip, int take)
Parameters
Type |
Name |
Description |
System.Int32 |
skip |
|
System.Int32 |
take |
|
Returns
View Source
GetPackageFileStream(PackageDefinition)
Declaration
public Stream? GetPackageFileStream(PackageDefinition definition)
Parameters
Returns
Type |
Description |
System.Nullable<Stream> |
|
View Source
InstallCompiledPackageData(FileInfo, Int32)
Declaration
public InstallationSummary InstallCompiledPackageData(FileInfo packageXmlFile, int userId = -1)
Parameters
Type |
Name |
Description |
FileInfo |
packageXmlFile |
|
System.Int32 |
userId |
|
Returns
View Source
InstallCompiledPackageData(XDocument, Int32)
Declaration
public InstallationSummary InstallCompiledPackageData(XDocument packageXml, int userId = -1)
Parameters
Type |
Name |
Description |
System.Xml.Linq.XDocument |
packageXml |
|
System.Int32 |
userId |
|
Returns
View Source
SaveCreatedPackage(PackageDefinition)
Declaration
public bool SaveCreatedPackage(PackageDefinition definition)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
UpdateCreatedPackageAsync(PackageDefinition, Guid)
Declaration
public async Task<Attempt<PackageDefinition, PackageOperationStatus>> UpdateCreatedPackageAsync(PackageDefinition package, Guid userKey)
Parameters
Returns