Review PR, adjustments

This commit is contained in:
Stephan
2019-02-06 17:28:48 +01:00
parent 87c85341fb
commit 8329097974
17 changed files with 212 additions and 207 deletions

View File

@@ -1,29 +1,30 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using Umbraco.Core.Models;
namespace Umbraco.Core.Events
{
/// <summary>
/// Represents event data for the Published event.
/// </summary>
public class ContentPublishedEventArgs : PublishEventArgs<IContent>
{
/// <summary>
/// Initializes a new instance of the <see cref="ContentPublishedEventArgs"/> class.
/// </summary>
public ContentPublishedEventArgs(IEnumerable<IContent> eventObject, bool canCancel, EventMessages eventMessages)
: base(eventObject, canCancel, eventMessages)
{
}
{ }
/// <summary>
/// Determines whether a culture has been published, during a Published event.
/// </summary>
public bool HasPublishedCulture(IContent content, string culture)
=> content.WasPropertyDirty("_changedCulture_" + culture);
=> content.WasPropertyDirty(ContentBase.ChangeTrackingPrefix.ChangedCulture + culture);
/// <summary>
/// Determines whether a culture has been unpublished, during a Published event.
/// </summary>
public bool HasUnpublishedCulture(IContent content, string culture)
=> content.WasPropertyDirty("_unpublishedCulture_" + culture);
=> content.WasPropertyDirty(ContentBase.ChangeTrackingPrefix.UnpublishedCulture + culture);
}
}