Class RelateOnCopyNotificationHandler
Handles the ContentCopiedNotification to create a relation between the original and copied content.
Inheritance
object
Namespace: Umbraco.Cms.Core.Events
Assembly: Umbraco.Core.dll
Syntax
public class RelateOnCopyNotificationHandler : INotificationHandler<ContentCopiedNotification>, INotificationAsyncHandler<ContentCopiedNotification>, INotificationHandler
Constructors
View SourceRelateOnCopyNotificationHandler(IRelationService, IAuditService)
Initializes a new instance of the RelateOnCopyNotificationHandler class.
Declaration
[Obsolete("Use the non-obsolete constructor instead. Scheduled for removal in Umbraco 19.")]
public RelateOnCopyNotificationHandler(IRelationService relationService, IAuditService auditService)
Parameters
| Type | Name | Description |
|---|---|---|
| IRelationService | relationService | The relation service. |
| IAuditService | auditService | The audit service. |
RelateOnCopyNotificationHandler(IRelationService, IAuditService, IUserIdKeyResolver)
Initializes a new instance of the RelateOnCopyNotificationHandler class.
Declaration
public RelateOnCopyNotificationHandler(IRelationService relationService, IAuditService auditService, IUserIdKeyResolver userIdKeyResolver)
Parameters
| Type | Name | Description |
|---|---|---|
| IRelationService | relationService | The relation service. |
| IAuditService | auditService | The audit service. |
| IUserIdKeyResolver | userIdKeyResolver | The user ID key resolver. |
Methods
View SourceHandle(ContentCopiedNotification)
Handles a notification.
Declaration
[Obsolete("Use the INotificationAsyncHandler.HandleAsync implementation instead. Scheduled for removal in Umbraco 19.")]
public void Handle(ContentCopiedNotification notification)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentCopiedNotification | notification | The notification. |
HandleAsync(ContentCopiedNotification, CancellationToken)
Handles a notification.
Declaration
public Task HandleAsync(ContentCopiedNotification notification, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentCopiedNotification | notification | The notification. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing the asynchronous operation. |