using CMSMicroservice.Domain.Events;
using Microsoft.Extensions.Logging;

namespace CMSMicroservice.Application.UserAddressCQ.EventHandlers;

public class UpdateUserAddressEventHandler : INotificationHandler<UpdateUserAddressEvent>
{
    private readonly ILogger<UpdateUserAddressEventHandler> _logger;

    public UpdateUserAddressEventHandler(ILogger<UpdateUserAddressEventHandler> logger)
    {
        _logger = logger;
    }

    public Task Handle(UpdateUserAddressEvent notification, CancellationToken cancellationToken)
    {
        _logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);

        return Task.CompletedTask;
    }
}
