StreamLink.NET  7.1.6-7.1.6-3952-ee12172
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | List of all members
Caplin.StreamLink.Alerts.NotificationService Class Reference

A NotificationService subscribes to a Notifications container of the StreamLink user and allows the user to register a listener to be called when notifications are triggered or dismissed. More...

Public Member Functions

void AddListener (INotificationListener listener)
 Adds a notification listener that will be called back when notifications are triggered or dismissed. More...
 
void DismissNotification (INotification notification, IResultListener listener)
 Dismiss a notification for the current user. More...
 
 NotificationService (IStreamLink streamLink)
 Initializes a new instance of the Caplin.StreamLink.Alerts.NotificationService for a given streamLink instance. More...
 
void RemoveListener (INotificationListener listener)
 Removes a previously added notification listener, callbacks to this listener will be stopped. More...
 

Detailed Description

A NotificationService subscribes to a Notifications container of the StreamLink user and allows the user to register a listener to be called when notifications are triggered or dismissed.

The service itself does not subscribe to anything unless listeners are added to it. For every listener added one subscription is being issued. These subscriptions induce the service state for the associated listeners. Therefore the service states can vary for different listeners. If the reference to the service is removed without removing all listeners beforehand, open subscriptions will stay around forever. To avoid that, remove all listeners before removing the service.

Constructor & Destructor Documentation

Caplin.StreamLink.Alerts.NotificationService.NotificationService ( IStreamLink  streamLink)
inline

Initializes a new instance of the Caplin.StreamLink.Alerts.NotificationService for a given streamLink instance.

Parameters
streamLinkthe StreamLink that will be used to receive notifications and dismiss them

Member Function Documentation

void Caplin.StreamLink.Alerts.NotificationService.AddListener ( INotificationListener  listener)
inline

Adds a notification listener that will be called back when notifications are triggered or dismissed.

Parameters
listenerThe NotificationListener to be added.
void Caplin.StreamLink.Alerts.NotificationService.DismissNotification ( INotification  notification,
IResultListener  listener 
)
inline

Dismiss a notification for the current user.

Parameters
notificationthe notification to dismiss.
listenera ResultListener that will be called back to notify the user code whether the operation was sent to liberator successfully or not
void Caplin.StreamLink.Alerts.NotificationService.RemoveListener ( INotificationListener  listener)
inline

Removes a previously added notification listener, callbacks to this listener will be stopped.

Parameters
listenerThe NotificationListener to be removed.

Generated on Tue Apr 28 2020 06:25:31 for StreamLink.NET