Search Results for

    Show / Hide Table of Contents
    View Source

    Class ElementUnpublishedNotification

    A notification that is used to trigger the IElementService when the UnPublish method is called in the API and after data has been unpublished.

    Inheritance
    object
    StatefulNotification
    ObjectNotification<IEnumerable<IElement>>
    EnumerableObjectNotification<IElement>
    Namespace: Umbraco.Cms.Core.Notifications
    Assembly: Umbraco.Core.dll
    Syntax
    public sealed class ElementUnpublishedNotification : EnumerableObjectNotification<IElement>, IStatefulNotification, INotification

    Constructors

    View Source

    ElementUnpublishedNotification(IEnumerable<IElement>, EventMessages)

    Declaration
    public ElementUnpublishedNotification(IEnumerable<IElement> target, EventMessages messages)
    Parameters
    Type Name Description
    IEnumerable<IElement> target
    EventMessages messages
    View Source

    ElementUnpublishedNotification(IEnumerable<IElement>, EventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>?)

    Initializes a new instance of the ElementUnpublishedNotification class with multiple elements and the cultures that were unpublished.

    Declaration
    public ElementUnpublishedNotification(IEnumerable<IElement> target, EventMessages messages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>? unpublishedCultures)
    Parameters
    Type Name Description
    IEnumerable<IElement> target

    The collection of elements that were unpublished.

    EventMessages messages

    The event messages collection.

    IReadOnlyDictionary<Guid, IReadOnlyCollection<string>> unpublishedCultures

    The cultures that were unpublished, keyed by element Key.

    View Source

    ElementUnpublishedNotification(IElement, EventMessages)

    Declaration
    public ElementUnpublishedNotification(IElement target, EventMessages messages)
    Parameters
    Type Name Description
    IElement target
    EventMessages messages
    View Source

    ElementUnpublishedNotification(IElement, EventMessages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>?)

    Initializes a new instance of the ElementUnpublishedNotification class with a single element and the cultures that were unpublished.

    Declaration
    public ElementUnpublishedNotification(IElement target, EventMessages messages, IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>? unpublishedCultures)
    Parameters
    Type Name Description
    IElement target

    The element that was unpublished.

    EventMessages messages

    The event messages collection.

    IReadOnlyDictionary<Guid, IReadOnlyCollection<string>> unpublishedCultures

    The cultures that were unpublished, keyed by element Key.

    Properties

    View Source

    UnpublishedCultures

    Gets the cultures that were unpublished for each element, keyed by element Key.

    Declaration
    public IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>? UnpublishedCultures { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<Guid, IReadOnlyCollection<string>>
    Remarks

    This notification is only raised when an element is unpublished as a whole; the value therefore reports every culture that was taken down (for invariant elements, ["*"]). Unpublishing an individual culture of a still-published variant element does not raise this notification — it is reported on UnpublishedCultures instead, because that operation is performed as a publish. Populated at raise-time (change tracking on the entity is reset once persisted, so it cannot be recovered from UnpublishedEntities afterwards). The dictionary is null only when the notification was raised without culture information (for example via a constructor overload that does not accept it).

    View Source

    UnpublishedEntities

    Gets a enumeration of IElement which are being unpublished.

    Declaration
    public IEnumerable<IElement> UnpublishedEntities { get; }
    Property Value
    Type Description
    IEnumerable<IElement>
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX