Files
Heimdall/src/Heimdall.Application/Events/Notifications/EventCreatedNotificationHandler.cs
T

16 lines
560 B
C#
Raw Normal View History

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).ConfigureAwait(false);
}
}