-
Notifications
You must be signed in to change notification settings - Fork 306
Expand file tree
/
Copy pathContactCreatedEventHandler.cs
More file actions
29 lines (25 loc) · 1.14 KB
/
ContactCreatedEventHandler.cs
File metadata and controls
29 lines (25 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//------------------------------------------------------------------------------
// <auto-generated>
// CleanArchitecture.Blazor - MIT Licensed.
// Author: neozhu
// Created/Modified: 2025-03-19
// Handles ContactCreatedEvent: triggered when a new contact is created.
// Extendable for additional actions (e.g., notifications, system updates).
// </auto-generated>
//------------------------------------------------------------------------------
namespace CleanArchitecture.Blazor.Application.Features.Contacts.EventHandlers;
public class ContactCreatedEventHandler : INotificationHandler<ContactCreatedEvent>
{
private readonly ILogger<ContactCreatedEventHandler> _logger;
public ContactCreatedEventHandler(
ILogger<ContactCreatedEventHandler> logger
)
{
_logger = logger;
}
public Task Handle(ContactCreatedEvent notification, CancellationToken cancellationToken)
{
_logger.LogInformation("Handled domain event '{EventType}' with notification: {@Notification} ", notification.GetType().Name, notification);
return Task.CompletedTask;
}
}