Interface that should be implemented to receive notification change callbacks from the NotificationProvider
More...
Interface that should be implemented to receive notification change callbacks from the NotificationProvider
A trivial implementation of NotificationListener would be:
using Caplin.StreamLink;
using Caplin.StreamLink.Alerts;
using System;
namespace caplin.streamlink.examplesnippets.alerts
{
public class NotificationListenerSnippet
{
private NotificationService notificationService;
public NotificationListenerSnippet( IStreamLink streamLink )
{
this.notificationService = new NotificationService(streamLink);
this.notificationService.AddListener(new ExampleNotificationListener());
}
class ExampleNotificationListener : INotificationListener
{
{
Console.WriteLine("OnNotificationRemoved(" + notification.ToString() + ")");
}
{
Console.WriteLine("OnNotification(" + notification.ToString() + ")");
}
{
Console.WriteLine("OnServiceStatus(" + status + ")");
}
}
}
}