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

namespace CMSMicroservice.Application.ProductsCQ.EventHandlers;

public class DeleteProductsEventHandler : INotificationHandler<DeleteProductsEvent>
{
    private readonly ILogger<
        DeleteProductsEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
