Target .Netstandard 2.0 (#8)

* 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
This commit is contained in:
Luis v.d.Eltz
2022-03-06 19:13:33 +01:00
committed by GitHub
parent 2d78b282fc
commit 68d4c265a5
14 changed files with 329 additions and 121 deletions
@@ -0,0 +1,57 @@
using System;
using System.Threading.Tasks;
#pragma warning disable CS0067
namespace DesktopNotifications.Windows
{
public class WindowsApplicationContext : ApplicationContext
{
public static WindowsApplicationContext FromCurrentProcess(
string? customName = null,
string? appUserModelId = null)
{
throw new PlatformNotSupportedException();
}
public WindowsApplicationContext(string name) : base(name)
{
throw new PlatformNotSupportedException();
}
}
public class WindowsNotificationManager : INotificationManager
{
public WindowsNotificationManager(WindowsApplicationContext? context = null)
{
throw new PlatformNotSupportedException();
}
public void Dispose()
{
throw new PlatformNotSupportedException();
}
public string? LaunchActionId { get; }
public event EventHandler<NotificationActivatedEventArgs>? NotificationActivated;
public event EventHandler<NotificationDismissedEventArgs>? NotificationDismissed;
public Task Initialize()
{
throw new PlatformNotSupportedException();
}
public Task ShowNotification(Notification notification, DateTimeOffset? expirationTime = null)
{
throw new PlatformNotSupportedException();
}
public Task ScheduleNotification(Notification notification, DateTimeOffset deliveryTime,
DateTimeOffset? expirationTime = null)
{
throw new PlatformNotSupportedException();
}
}
}