using GozareshgirProgramManager.Application._Common.Models; using GozareshgirProgramManager.Application.Interfaces; using GozareshgirProgramManager.Domain.ProjectAgg.Events; using MediatR; namespace GozareshgirProgramManager.Application.DomainEventHandlers.ProjectSection; public class TaskSectionStatusChangedHandler:INotificationHandler> { private readonly IBoardNotificationPublisher _boardNotificationPublisher; public TaskSectionStatusChangedHandler(IBoardNotificationPublisher boardNotificationPublisher) { _boardNotificationPublisher = boardNotificationPublisher; } public Task Handle(DomainEventNotification notification, CancellationToken cancellationToken) { var domainEvent = notification.DomainEvent; _boardNotificationPublisher.SendProjectStatusChanged(domainEvent.UserId,domainEvent.OldStatus,domainEvent.NewStatus,domainEvent.SectionId); return Task.CompletedTask; } }