16 lines
538 B
C#
16 lines
538 B
C#
using Heimdall.Application.Services;
|
|||
|
|
using MediatR;
|
||
|
|
|
||
|
|
namespace Heimdall.Application.Events.Notifications;
|
||
|
|
|
||
|
|
public class EventCreatedNotificationHandler : INotificationHandler<EventCreatedNotification>
|
||
|
|
{
|
||
|
|
private readonly IEventBroadcastService _broadcast;
|
||
|
|
|
||
|
|
public EventCreatedNotificationHandler(IEventBroadcastService broadcast) => _broadcast = broadcast;
|
||
|
|
|
||
|
|
public async Task Handle(EventCreatedNotification notification, CancellationToken ct)
|
||
|
|
{
|
||
|
|
await _broadcast.NotifyEventCreated(notification.Event, ct);
|
||
|
|
}
|
||
|
|
}
|