Class DeletingVersionsNotification<T>
Abstract base class for cancelable notifications published before versions are deleted.
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public abstract class DeletingVersionsNotification<T> : DeletedVersionsNotificationBase<T>, IStatefulNotification, ICancelableNotification, INotification where T : class
Type Parameters
| Name | Description |
|---|---|
| T | The type of entity whose versions are being deleted. |
Remarks
This notification is published before versions are deleted, allowing handlers to cancel
the operation by setting Cancel to true.
Constructors
View SourceDeletingVersionsNotification(int, EventMessages, int, bool, DateTime)
Initializes a new instance of the DeletingVersionsNotification<T> class.
Declaration
protected DeletingVersionsNotification(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 SourceCancel
Gets or sets a value indicating whether the operation should be canceled.
Declaration
public bool Cancel { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|