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

namespace CMSMicroservice.Application.TagCQ.EventHandlers;

public class CreateNewTagEventHandler : INotificationHandler<CreateNewTagEvent>
{
    private readonly ILogger<CreateNewTagEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}

