Class DeletedVersionsNotificationBase<T>
Abstract base class for notifications related to deleting content or media versions.
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public abstract class DeletedVersionsNotificationBase<T> : StatefulNotification, IStatefulNotification, INotification where T : class
Type Parameters
| Name | Description |
|---|---|
| T | The type of entity whose versions are being deleted. |
Remarks
This notification provides information about which versions are being deleted, including support for deleting specific versions, prior versions, or versions before a certain date.
Constructors
View SourceDeletedVersionsNotificationBase(int, EventMessages, int, bool, DateTime)
Initializes a new instance of the DeletedVersionsNotificationBase<T> class.
Declaration
protected DeletedVersionsNotificationBase(int id, EventMessages messages, int specificVersion = 0, bool deletePriorVersions = false, DateTime dateToRetain = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The ID of the entity whose versions are being deleted. |
| EventMessages | messages | The event messages collection. |
| int | specificVersion | The specific version to delete, or default to delete based on other criteria. |
| bool | deletePriorVersions | Whether to delete all versions prior to the specified version. |
| DateTime | dateToRetain | The date before which versions should be deleted. |
Properties
View SourceDateToRetain
Gets the date before which versions should be deleted.
Declaration
public DateTime DateToRetain { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
DeletePriorVersions
Gets a value indicating whether to delete all versions prior to the specified version.
Declaration
public bool DeletePriorVersions { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Id
Gets the ID of the entity whose versions are being deleted.
Declaration
public int Id { get; }
Property Value
| Type | Description |
|---|---|
| int |
Messages
Gets the event messages collection.
Declaration
public EventMessages Messages { get; }
Property Value
| Type | Description |
|---|---|
| EventMessages |
SpecificVersion
Gets the specific version to delete, or default if not targeting a specific version.
Declaration
public int SpecificVersion { get; }
Property Value
| Type | Description |
|---|---|
| int |