OmniLinkBridge/OmniLinkBridge/Notifications/Notification.cs
Ryan Wagoner 4e2bb85623 1.1.0 - Renamed to OmniLinkBridge
- Restructured code to be event based with modules
- Added MQTT module for Home Assistant
- Added pushover notifications
- Added web service API subscriptions file to persist subscriptions
2018-10-13 22:10:54 -04:00

24 lines
683 B
C#

using System.Collections.Generic;
using System.Threading.Tasks;
namespace OmniLinkBridge.Notifications
{
public static class Notification
{
private static readonly List<INotification> providers = new List<INotification>()
{
new EmailNotification(),
new ProwlNotification(),
new PushoverNotification()
};
public static void Notify(string source, string description, NotificationPriority priority = NotificationPriority.Normal)
{
Parallel.ForEach(providers, (provider) =>
{
provider.Notify(source, description, priority);
});
}
}
}