Class ConflictingPackageData
Provides methods to detect conflicting package data during package installation.
Inheritance
Namespace: Umbraco.Cms.Core.Packaging
Assembly: Umbraco.Core.dll
Syntax
public class ConflictingPackageData
Constructors
View SourceConflictingPackageData(IFileService)
Initializes a new instance of the ConflictingPackageData class.
Declaration
public ConflictingPackageData(IFileService fileService)
Parameters
| Type | Name | Description |
|---|---|---|
| IFileService | fileService | The file service used to check for existing files. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
Methods
View SourceFindConflictingStylesheets(IEnumerable<XElement>?)
Finds stylesheets in the package that already exist in the system.
Declaration
public IEnumerable<IFile?>? FindConflictingStylesheets(IEnumerable<XElement>? stylesheetNodes)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<XElement> | stylesheetNodes | The XML elements representing stylesheets from the package. |
Returns
| Type | Description |
|---|---|
| IEnumerable<IFile> | A collection of existing stylesheets that conflict with the package, or |
Exceptions
| Type | Condition |
|---|---|
| FormatException | Thrown when a stylesheet node is missing the required "Name" element. |
FindConflictingTemplates(IEnumerable<XElement>?)
Finds templates in the package that already exist in the system.
Declaration
public IEnumerable<ITemplate>? FindConflictingTemplates(IEnumerable<XElement>? templateNodes)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<XElement> | templateNodes | The XML elements representing templates from the package. |
Returns
| Type | Description |
|---|---|
| IEnumerable<ITemplate> | A collection of existing templates that conflict with the package, or |
Exceptions
| Type | Condition |
|---|---|
| FormatException | Thrown when a template node is missing the required "Alias" element. |