Search Results for

    Show / Hide Table of Contents
    View Source

    Class RelateOnTrashNotificationHandler

    Handles notifications triggered when content is moved to the recycle bin ("trash") in Umbraco, and manages the relationships between the trashed content and other entities accordingly.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Events
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public sealed class RelateOnTrashNotificationHandler : INotificationHandler<ContentMovedNotification>, INotificationAsyncHandler<ContentMovedToRecycleBinNotification>, INotificationHandler<MediaMovedNotification>, INotificationAsyncHandler<MediaMovedToRecycleBinNotification>, INotificationHandler<ElementMovedNotification>, INotificationAsyncHandler<ElementMovedToRecycleBinNotification>, INotificationHandler<EntityContainerMovedNotification>, INotificationAsyncHandler<EntityContainerMovedToRecycleBinNotification>, INotificationHandler

    Constructors

    View Source

    RelateOnTrashNotificationHandler(IRelationService, IEntityService, ICoreScopeProvider)

    Initializes a new instance of the RelateOnTrashNotificationHandler class.

    Declaration
    public RelateOnTrashNotificationHandler(IRelationService relationService, IEntityService entityService, ICoreScopeProvider scopeProvider)
    Parameters
    Type Name Description
    IRelationService relationService

    Service used to manage relations between entities.

    IEntityService entityService

    Service used to manage entities within Umbraco.

    ICoreScopeProvider scopeProvider

    Provider for managing database scopes.

    View Source

    RelateOnTrashNotificationHandler(IRelationService, IEntityService, ICoreScopeProvider, ILocalizedTextService, IAuditService, IScopeProvider, IBackOfficeSecurityAccessor, IUserIdKeyResolver)

    Declaration
    [Obsolete("Use the non-obsolete constructor instead. Scheduled for removal in Umbraco 19.")]
    public RelateOnTrashNotificationHandler(IRelationService relationService, IEntityService entityService, ICoreScopeProvider coreScopeProvider, ILocalizedTextService textService, IAuditService auditService, IScopeProvider scopeProvider, IBackOfficeSecurityAccessor backOfficeSecurityAccessor, IUserIdKeyResolver userIdKeyResolver)
    Parameters
    Type Name Description
    IRelationService relationService
    IEntityService entityService
    ICoreScopeProvider coreScopeProvider
    ILocalizedTextService textService
    IAuditService auditService
    IScopeProvider scopeProvider
    IBackOfficeSecurityAccessor backOfficeSecurityAccessor
    IUserIdKeyResolver userIdKeyResolver
    View Source

    RelateOnTrashNotificationHandler(IRelationService, IEntityService, ILocalizedTextService, IAuditService, IScopeProvider, IBackOfficeSecurityAccessor)

    Initializes a new instance of the RelateOnTrashNotificationHandler class. Handles the creation of relations when entities are moved to the recycle bin (trashed).

    Declaration
    [Obsolete("Use the non-obsolete constructor instead. Scheduled for removal in Umbraco 19.")]
    public RelateOnTrashNotificationHandler(IRelationService relationService, IEntityService entityService, ILocalizedTextService textService, IAuditService auditService, IScopeProvider scopeProvider, IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
    Parameters
    Type Name Description
    IRelationService relationService

    Service used to manage relations between entities.

    IEntityService entityService

    Service for accessing and managing entities.

    ILocalizedTextService textService

    Service for retrieving localized text strings.

    IAuditService auditService

    Service for logging audit events.

    IScopeProvider scopeProvider

    Provides scope management for database operations.

    IBackOfficeSecurityAccessor backOfficeSecurityAccessor

    Accessor for back office security context.

    View Source

    RelateOnTrashNotificationHandler(IRelationService, IEntityService, ILocalizedTextService, IAuditService, IScopeProvider, IBackOfficeSecurityAccessor, IUserIdKeyResolver)

    Declaration
    [Obsolete("Use the non-obsolete constructor instead. Scheduled for removal in Umbraco 19.")]
    public RelateOnTrashNotificationHandler(IRelationService relationService, IEntityService entityService, ILocalizedTextService textService, IAuditService auditService, IScopeProvider scopeProvider, IBackOfficeSecurityAccessor backOfficeSecurityAccessor, IUserIdKeyResolver userIdKeyResolver)
    Parameters
    Type Name Description
    IRelationService relationService
    IEntityService entityService
    ILocalizedTextService textService
    IAuditService auditService
    IScopeProvider scopeProvider
    IBackOfficeSecurityAccessor backOfficeSecurityAccessor
    IUserIdKeyResolver userIdKeyResolver

    Methods

    View Source

    Handle(ContentMovedNotification)

    Handles a notification.

    Declaration
    public void Handle(ContentMovedNotification notification)
    Parameters
    Type Name Description
    ContentMovedNotification notification

    The notification.

    View Source

    Handle(ElementMovedNotification)

    Handles a notification.

    Declaration
    public void Handle(ElementMovedNotification notification)
    Parameters
    Type Name Description
    ElementMovedNotification notification

    The notification.

    View Source

    Handle(EntityContainerMovedNotification)

    Handles a notification.

    Declaration
    public void Handle(EntityContainerMovedNotification notification)
    Parameters
    Type Name Description
    EntityContainerMovedNotification notification

    The notification.

    View Source

    Handle(MediaMovedNotification)

    Handles a notification.

    Declaration
    public void Handle(MediaMovedNotification notification)
    Parameters
    Type Name Description
    MediaMovedNotification notification

    The notification.

    View Source

    HandleAsync(ContentMovedToRecycleBinNotification, CancellationToken)

    Handles a notification.

    Declaration
    public Task HandleAsync(ContentMovedToRecycleBinNotification notification, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    ContentMovedToRecycleBinNotification notification

    The notification.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    View Source

    HandleAsync(ElementMovedToRecycleBinNotification, CancellationToken)

    Handles a notification.

    Declaration
    public Task HandleAsync(ElementMovedToRecycleBinNotification notification, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    ElementMovedToRecycleBinNotification notification

    The notification.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    View Source

    HandleAsync(EntityContainerMovedToRecycleBinNotification, CancellationToken)

    Handles a notification.

    Declaration
    public Task HandleAsync(EntityContainerMovedToRecycleBinNotification notification, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    EntityContainerMovedToRecycleBinNotification notification

    The notification.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    View Source

    HandleAsync(MediaMovedToRecycleBinNotification, CancellationToken)

    Handles a notification.

    Declaration
    public Task HandleAsync(MediaMovedToRecycleBinNotification notification, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    MediaMovedToRecycleBinNotification notification

    The notification.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX