ObserverSubscriptionManager<T> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The ObserverSubscriptionManager class is a helper class for grains that support observers. It provides methods for tracking subscribing observers and for sending notifications.
[System.Serializable]
public class ObserverSubscriptionManager<T> where T : IGrainObserver
[<System.Serializable>]
type ObserverSubscriptionManager<'T (requires 'T :> IGrainObserver)> = class
Public Class ObserverSubscriptionManager(Of T)
Type Parameters
- T
The observer interface type to be managed.
- Inheritance
-
ObserverSubscriptionManager<T>
- Attributes
Constructors
ObserverSubscriptionManager<T>() |
Constructs an empty subscription manager. |
Properties
Count |
Number of subscribers currently registered |
Methods
Clear() |
Removes all subscriptions. |
IsSubscribed(T) |
Determines if the SubscriptionManager has the input observer |
Notify(Action<T>) |
Sends a notification to all subscribers. |
Subscribe(T) |
Records a new subscribing observer. |
Unsubscribe(T) |
Removes a (former) subscriber. |