INotificationSubscriber Interface
Represents the operations that are used to receive notifications from the Notifications Provider.
Namespace: Microsoft.WindowsServerSolutions.Common.ProviderFramework.Notifications
Assembly: CoreProviders (in CoreProviders.dll)
Syntax
public interface INotificationSubscriber
public interface class INotificationSubscriber
Public Interface INotificationSubscriber
Methods
Name | Description | |
---|---|---|
OnNotificationCleared(Notification) | Informs the subscriber that a persistent Notification object has been cleared. |
|
OnNotificationRaised(Notification) | Informs the subscriber of a new Notification object. |
Remarks
You can use the following ways to subscribe to receive Notification objects:
Create a class that implements this interface, and then pass an instance of that class to the NotificationSubscription constructor.
Call one of the Create methods of ReadOnlyObservableNotificationCollection.
If you use ReadOnlyObservableNotificationCollection to subscribe to Notifications, you only receive persistent Notification objects, because one-shot notifications should not be added to the collection. One-shot notifications do not have a lifetime, and would therefore never be removed from the collection.
Note
The methods of INotificationSubscriber may be called on any thread. If you implement this interface, you must synchronize your code appropriately.
See Also
Microsoft.WindowsServerSolutions.Common.ProviderFramework.Notifications Namespace
Return to top