Class AddDomainWarningsWhenPublishingNotificationHandler
Handles the ContentPublishedNotification to add warnings when domains are not properly configured for multilingual sites.
Inheritance
object
Namespace: Umbraco.Cms.Core.Events
Assembly: Umbraco.Core.dll
Syntax
public class AddDomainWarningsWhenPublishingNotificationHandler : INotificationAsyncHandler<ContentPublishedNotification>, INotificationHandler
Constructors
View SourceAddDomainWarningsWhenPublishingNotificationHandler(IOptions<ContentSettings>, IContentService, IDomainService, IEventMessagesFactory, ILogger<AddDomainWarningsWhenPublishingNotificationHandler>)
Initializes a new instance of the AddDomainWarningsWhenPublishingNotificationHandler class.
Declaration
public AddDomainWarningsWhenPublishingNotificationHandler(IOptions<ContentSettings> contentSettings, IContentService contentService, IDomainService domainService, IEventMessagesFactory eventMessagesFactory, ILogger<AddDomainWarningsWhenPublishingNotificationHandler> logger)
Parameters
| Type | Name | Description |
|---|---|---|
| IOptions<ContentSettings> | contentSettings | The content settings. |
| IContentService | contentService | The content service. |
| IDomainService | domainService | The domain service. |
| IEventMessagesFactory | eventMessagesFactory | The event messages factory. |
| ILogger<AddDomainWarningsWhenPublishingNotificationHandler> | logger | The logger. |
Methods
View SourceHandleAsync(ContentPublishedNotification, CancellationToken)
Handles a notification.
Declaration
public Task HandleAsync(ContentPublishedNotification notification, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentPublishedNotification | notification | The notification. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing the asynchronous operation. |