This commit is contained in:
masoodafar-web
2025-11-17 23:49:48 +03:30
parent 51d1f9a6f5
commit 78e461909f
31 changed files with 48296 additions and 7383 deletions
@@ -0,0 +1,22 @@
using CMSMicroservice.Domain.Events;
using Microsoft.Extensions.Logging;
namespace CMSMicroservice.Application.CategoryCQ.EventHandlers;
public class CreateNewCategoryEventHandler : INotificationHandler<CreateNewCategoryEvent>
{
private readonly ILogger<CreateNewCategoryEventHandler> _logger;
public CreateNewCategoryEventHandler(ILogger<CreateNewCategoryEventHandler> logger)
{
_logger = logger;
}
public Task Handle(CreateNewCategoryEvent notification, CancellationToken cancellationToken)
{
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);
return Task.CompletedTask;
}
}
@@ -0,0 +1,22 @@
using CMSMicroservice.Domain.Events;
using Microsoft.Extensions.Logging;
namespace CMSMicroservice.Application.CategoryCQ.EventHandlers;
public class DeleteCategoryEventHandler : INotificationHandler<DeleteCategoryEvent>
{
private readonly ILogger<DeleteCategoryEventHandler> _logger;
public DeleteCategoryEventHandler(ILogger<DeleteCategoryEventHandler> logger)
{
_logger = logger;
}
public Task Handle(DeleteCategoryEvent notification, CancellationToken cancellationToken)
{
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);
return Task.CompletedTask;
}
}
@@ -0,0 +1,22 @@
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;
}
}