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

namespace CMSMicroservice.Application.CategoryCQ.EventHandlers;

public class UpdateCategoryEventHandler : INotificationHandler<UpdateCategoryEvent>
{
    private readonly ILogger<UpdateCategoryEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}

