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

namespace CMSMicroservice.Application.UserCQ.EventHandlers.SetPasswordForUserEventHandlers;

public class SetPasswordForUserEventHandler : INotificationHandler<SetPasswordForUserEvent>
{
    private readonly ILogger<
        SetPasswordForUserEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
