public interface IPushNotificationService
{
public void Notify(string title, string message);
public void OnStart();
public void OnStop();
}
#if WINDOWS
using Microsoft.Toolkit.Uwp.Notifications;
// other code
#endif
namespace ArticleTracker.Platforms.Windows
{
public class PushNotificationManager : IPushNotificationManager
{
public void SendNotification(string title, string message)
{
var notification = new AppNotificationBuilder()
.AddText(title)
.AddText(message)
.BuildNotification();
AppNotificationManager.Default.Show(notification);
}
}
}
И в чем же моя вина(криворукость)?