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

namespace CMSMicroservice.Application.RoleCQ.EventHandlers;

public class DeleteRoleEventHandler : INotificationHandler<DeleteRoleEvent>
{
    private readonly ILogger<DeleteRoleEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
