generated from Integry/Template_NetMauiBlazorHybrid
14 lines
449 B
C#
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); });
|
|
}
|
|
} |