From 1ed24e78c82f51c64147431e950fdb4a451d0eae Mon Sep 17 00:00:00 2001 From: Roy Berris Date: Mon, 28 Nov 2022 23:26:59 +0100 Subject: [PATCH] Notification documentation (#13207) --- src/Umbraco.Core/Notifications/ContentMovedNotification.cs | 3 +++ src/Umbraco.Core/Notifications/ContentMovingNotification.cs | 3 +++ .../Notifications/ContentPublishedNotification.cs | 6 ++++++ .../Notifications/ContentPublishingNotification.cs | 6 ++++++ src/Umbraco.Core/Notifications/ContentSortedNotification.cs | 3 +++ .../Notifications/ContentSortingNotification.cs | 3 +++ src/Umbraco.Core/Notifications/MovedNotification.cs | 3 +++ src/Umbraco.Core/Notifications/MovingNotification.cs | 3 +++ 8 files changed, 30 insertions(+) diff --git a/src/Umbraco.Core/Notifications/ContentMovedNotification.cs b/src/Umbraco.Core/Notifications/ContentMovedNotification.cs index 50bd24876d..bfba84db48 100644 --- a/src/Umbraco.Core/Notifications/ContentMovedNotification.cs +++ b/src/Umbraco.Core/Notifications/ContentMovedNotification.cs @@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models; namespace Umbraco.Cms.Core.Notifications; +/// +/// Called after content has been moved. +/// public sealed class ContentMovedNotification : MovedNotification { public ContentMovedNotification(MoveEventInfo target, EventMessages messages) diff --git a/src/Umbraco.Core/Notifications/ContentMovingNotification.cs b/src/Umbraco.Core/Notifications/ContentMovingNotification.cs index eddc7a13f7..6fd0fc1115 100644 --- a/src/Umbraco.Core/Notifications/ContentMovingNotification.cs +++ b/src/Umbraco.Core/Notifications/ContentMovingNotification.cs @@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models; namespace Umbraco.Cms.Core.Notifications; +/// +/// Called while content is moving, but before it has been moved. Cancel the operation to prevent the movement. +/// public sealed class ContentMovingNotification : MovingNotification { public ContentMovingNotification(MoveEventInfo target, EventMessages messages) diff --git a/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs b/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs index 0400155d3c..a5929a393f 100644 --- a/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs +++ b/src/Umbraco.Core/Notifications/ContentPublishedNotification.cs @@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models; namespace Umbraco.Cms.Core.Notifications; +/// +/// Called after content has been published. +/// public sealed class ContentPublishedNotification : EnumerableObjectNotification { public ContentPublishedNotification(IContent target, EventMessages messages) @@ -18,5 +21,8 @@ public sealed class ContentPublishedNotification : EnumerableObjectNotification< { } + /// + /// Gets a enumeration of with the published entities. + /// public IEnumerable PublishedEntities => Target; } diff --git a/src/Umbraco.Core/Notifications/ContentPublishingNotification.cs b/src/Umbraco.Core/Notifications/ContentPublishingNotification.cs index c9a1110089..fd958d2341 100644 --- a/src/Umbraco.Core/Notifications/ContentPublishingNotification.cs +++ b/src/Umbraco.Core/Notifications/ContentPublishingNotification.cs @@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models; namespace Umbraco.Cms.Core.Notifications; +/// +/// Called while publishing content but before content has been published. Cancel the operation to prevent the publish. +/// public sealed class ContentPublishingNotification : CancelableEnumerableObjectNotification { public ContentPublishingNotification(IContent target, EventMessages messages) @@ -18,5 +21,8 @@ public sealed class ContentPublishingNotification : CancelableEnumerableObjectNo { } + /// + /// Gets a enumeration of which are being published. + /// public IEnumerable PublishedEntities => Target; } diff --git a/src/Umbraco.Core/Notifications/ContentSortedNotification.cs b/src/Umbraco.Core/Notifications/ContentSortedNotification.cs index 8f0d6304ff..3473f816fb 100644 --- a/src/Umbraco.Core/Notifications/ContentSortedNotification.cs +++ b/src/Umbraco.Core/Notifications/ContentSortedNotification.cs @@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models; namespace Umbraco.Cms.Core.Notifications; +/// +/// Called after content has been sorted. +/// public sealed class ContentSortedNotification : SortedNotification { public ContentSortedNotification(IEnumerable target, EventMessages messages) diff --git a/src/Umbraco.Core/Notifications/ContentSortingNotification.cs b/src/Umbraco.Core/Notifications/ContentSortingNotification.cs index bc3e94a464..4570b68489 100644 --- a/src/Umbraco.Core/Notifications/ContentSortingNotification.cs +++ b/src/Umbraco.Core/Notifications/ContentSortingNotification.cs @@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models; namespace Umbraco.Cms.Core.Notifications; +/// +/// Called while content is sorting, but before content has been sorted. Cancel the operation to cancel the sorting. +/// public sealed class ContentSortingNotification : SortingNotification { public ContentSortingNotification(IEnumerable target, EventMessages messages) diff --git a/src/Umbraco.Core/Notifications/MovedNotification.cs b/src/Umbraco.Core/Notifications/MovedNotification.cs index f67273a6d4..5aab6c6b7a 100644 --- a/src/Umbraco.Core/Notifications/MovedNotification.cs +++ b/src/Umbraco.Core/Notifications/MovedNotification.cs @@ -17,5 +17,8 @@ public abstract class MovedNotification : ObjectNotification + /// Gets a enumeration of with the moved entities. + /// public IEnumerable> MoveInfoCollection => Target; } diff --git a/src/Umbraco.Core/Notifications/MovingNotification.cs b/src/Umbraco.Core/Notifications/MovingNotification.cs index 47a2ecf7bf..41f4c1754a 100644 --- a/src/Umbraco.Core/Notifications/MovingNotification.cs +++ b/src/Umbraco.Core/Notifications/MovingNotification.cs @@ -17,5 +17,8 @@ public abstract class MovingNotification : CancelableObjectNotification + /// Gets a enumeration of with the moving entities. + /// public IEnumerable> MoveInfoCollection => Target; }