Files
TaskHybrid/salesbook.Shared/Core/Messages/Notification/NewPushNotificationService.cs
2025-09-09 16:30:51 +02:00

14 lines
449 B
C#

using CommunityToolkit.Mvvm.Messaging;
using salesbook.Shared.Core.Dto.Notification;
namespace salesbook.Shared.Core.Messages.Notification;
public class NewPushNotificationService
{
public event Action<PushNotificationDTO>? OnNotificationReceived;
public NewPushNotificationService(IMessenger messenger)
{
messenger.Register<NewPushNotificationMessage>(this, (_, o) => { OnNotificationReceived?.Invoke(o.Value); });
}
}