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