Implements the new publish and unpublish events in the PublishingStrategy.

Making the PublishStrategy public, so that its possible to subscribe to the events.
Removing the old PublishingEventArgs, which is no longer used.
Correcting a few comments.
This commit is contained in:
Morten Christensen
2012-12-28 14:47:09 -01:00
parent 194d241b02
commit 5dbcfa57a8
9 changed files with 133 additions and 225 deletions

View File

@@ -5,41 +5,45 @@ namespace Umbraco.Core.Events
public class PublishEventArgs<TEntity> : CancellableObjectEventArgs<IEnumerable<TEntity>>
{
/// <summary>
/// Constructor accepting multiple entities that are used in the publish operation
/// </summary>
/// <param name="eventObject"></param>
/// <param name="canCancel"></param>
public PublishEventArgs(IEnumerable<TEntity> eventObject, bool canCancel)
/// Constructor accepting multiple entities that are used in the publish operation
/// </summary>
/// <param name="eventObject"></param>
/// <param name="canCancel"></param>
/// <param name="isAllPublished"></param>
public PublishEventArgs(IEnumerable<TEntity> eventObject, bool canCancel, bool isAllPublished)
: base(eventObject, canCancel)
{
IsAllRepublished = isAllPublished;
}
/// <summary>
/// Constructor accepting multiple entities that are used in the publish operation
/// </summary>
/// <param name="eventObject"></param>
public PublishEventArgs(IEnumerable<TEntity> eventObject)
/// <summary>
/// Constructor accepting multiple entities that are used in the publish operation
/// </summary>
/// <param name="eventObject"></param>
public PublishEventArgs(IEnumerable<TEntity> eventObject)
: base(eventObject)
{
}
/// <summary>
/// Constructor accepting a single entity instance
/// </summary>
/// <param name="eventObject"></param>
public PublishEventArgs(TEntity eventObject)
/// <summary>
/// Constructor accepting a single entity instance
/// </summary>
/// <param name="eventObject"></param>
public PublishEventArgs(TEntity eventObject)
: base(new List<TEntity> { eventObject })
{
}
/// <summary>
/// Constructor accepting a single entity instance
/// </summary>
/// <param name="eventObject"></param>
/// <param name="canCancel"></param>
public PublishEventArgs(TEntity eventObject, bool canCancel)
/// <summary>
/// Constructor accepting a single entity instance
/// </summary>
/// <param name="eventObject"></param>
/// <param name="canCancel"></param>
/// <param name="isAllPublished"></param>
public PublishEventArgs(TEntity eventObject, bool canCancel, bool isAllPublished)
: base(new List<TEntity> { eventObject }, canCancel)
{
IsAllRepublished = isAllPublished;
}
/// <summary>
@@ -49,5 +53,7 @@ namespace Umbraco.Core.Events
{
get { return EventObject; }
}
public bool IsAllRepublished { get; private set; }
}
}

View File

@@ -1,17 +0,0 @@
namespace Umbraco.Core.Events
{
public class PublishingEventArgs : System.ComponentModel.CancelEventArgs
{
public PublishingEventArgs()
{
IsAllRepublished = false;
}
public PublishingEventArgs(bool isAllPublished)
{
IsAllRepublished = isAllPublished;
}
public bool IsAllRepublished { get; private set; }
}
}