68d4c265a5
* Fix build on non-windows platform * Update to netstandard 2.0 Fix build on OSX * Fix netstandard UWP API usage * Update README.md * Fix build * Fix build * Fix build on *Nix * Remove Win stuff on nonwindows * fix compilation * Fixes * Fix
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Threading.Tasks;
|
|
|
|
#pragma warning disable 0067
|
|
|
|
namespace DesktopNotifications.Apple
|
|
{
|
|
public class AppleNotificationManager : INotificationManager
|
|
{
|
|
[DllImport("DesktopNotifications.Apple.Native.dylib")]
|
|
private static extern void ShowNotification();
|
|
|
|
public void Dispose()
|
|
{
|
|
}
|
|
|
|
public event EventHandler<NotificationActivatedEventArgs>? NotificationActivated;
|
|
public event EventHandler<NotificationDismissedEventArgs>? NotificationDismissed;
|
|
|
|
public string? LaunchActionId { get; }
|
|
|
|
public Task Initialize()
|
|
{
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public Task ShowNotification(Notification notification, DateTimeOffset? expirationTime = null)
|
|
{
|
|
ShowNotification();
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public Task ScheduleNotification(Notification notification, DateTimeOffset deliveryTime,
|
|
DateTimeOffset? expirationTime = null)
|
|
{
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|
|
}
|