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

namespace CMSMicroservice.Application.RoleCQ.EventHandlers;

public class UpdateRoleEventHandler : INotificationHandler<UpdateRoleEvent>
{
    private readonly ILogger<UpdateRoleEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
