Notification documentation (#13207)
This commit is contained in:
@@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications;
|
||||
|
||||
/// <summary>
|
||||
/// Called after content has been moved.
|
||||
/// </summary>
|
||||
public sealed class ContentMovedNotification : MovedNotification<IContent>
|
||||
{
|
||||
public ContentMovedNotification(MoveEventInfo<IContent> target, EventMessages messages)
|
||||
|
||||
@@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications;
|
||||
|
||||
/// <summary>
|
||||
/// Called while content is moving, but before it has been moved. Cancel the operation to prevent the movement.
|
||||
/// </summary>
|
||||
public sealed class ContentMovingNotification : MovingNotification<IContent>
|
||||
{
|
||||
public ContentMovingNotification(MoveEventInfo<IContent> target, EventMessages messages)
|
||||
|
||||
@@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications;
|
||||
|
||||
/// <summary>
|
||||
/// Called after content has been published.
|
||||
/// </summary>
|
||||
public sealed class ContentPublishedNotification : EnumerableObjectNotification<IContent>
|
||||
{
|
||||
public ContentPublishedNotification(IContent target, EventMessages messages)
|
||||
@@ -18,5 +21,8 @@ public sealed class ContentPublishedNotification : EnumerableObjectNotification<
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a enumeration of <see cref="IContent"/> with the published entities.
|
||||
/// </summary>
|
||||
public IEnumerable<IContent> PublishedEntities => Target;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications;
|
||||
|
||||
/// <summary>
|
||||
/// Called while publishing content but before content has been published. Cancel the operation to prevent the publish.
|
||||
/// </summary>
|
||||
public sealed class ContentPublishingNotification : CancelableEnumerableObjectNotification<IContent>
|
||||
{
|
||||
public ContentPublishingNotification(IContent target, EventMessages messages)
|
||||
@@ -18,5 +21,8 @@ public sealed class ContentPublishingNotification : CancelableEnumerableObjectNo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a enumeration of <see cref="IContent"/> which are being published.
|
||||
/// </summary>
|
||||
public IEnumerable<IContent> PublishedEntities => Target;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications;
|
||||
|
||||
/// <summary>
|
||||
/// Called after content has been sorted.
|
||||
/// </summary>
|
||||
public sealed class ContentSortedNotification : SortedNotification<IContent>
|
||||
{
|
||||
public ContentSortedNotification(IEnumerable<IContent> target, EventMessages messages)
|
||||
|
||||
@@ -6,6 +6,9 @@ using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Notifications;
|
||||
|
||||
/// <summary>
|
||||
/// Called while content is sorting, but before content has been sorted. Cancel the operation to cancel the sorting.
|
||||
/// </summary>
|
||||
public sealed class ContentSortingNotification : SortingNotification<IContent>
|
||||
{
|
||||
public ContentSortingNotification(IEnumerable<IContent> target, EventMessages messages)
|
||||
|
||||
@@ -17,5 +17,8 @@ public abstract class MovedNotification<T> : ObjectNotification<IEnumerable<Move
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a enumeration of <see cref="MoveEventInfo{TEntity}"/> with the moved entities.
|
||||
/// </summary>
|
||||
public IEnumerable<MoveEventInfo<T>> MoveInfoCollection => Target;
|
||||
}
|
||||
|
||||
@@ -17,5 +17,8 @@ public abstract class MovingNotification<T> : CancelableObjectNotification<IEnum
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a enumeration of <see cref="MoveEventInfo{TEntity}"/> with the moving entities.
|
||||
/// </summary>
|
||||
public IEnumerable<MoveEventInfo<T>> MoveInfoCollection => Target;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user