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

namespace CMSMicroservice.Application.UserAddressCQ.EventHandlers;

public class DeleteUserAddressEventHandler : INotificationHandler<DeleteUserAddressEvent>
{
    private readonly ILogger<DeleteUserAddressEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
