Edit

Share via


ObserverManager<TObserver> Class

Definition

Maintains a collection of observers.

public class ObserverManager<TObserver> : Orleans.Utilities.ObserverManager<Orleans.Runtime.IAddressable,TObserver>
type ObserverManager<'Observer> = class
    inherit ObserverManager<IAddressable, 'Observer>
Public Class ObserverManager(Of TObserver)
Inherits ObserverManager(Of IAddressable, TObserver)

Type Parameters

TObserver

The observer type.

Inheritance
ObserverManager<TObserver>

Constructors

ObserverManager<TObserver>(TimeSpan, ILogger)

Initializes a new instance of the ObserverManager<TObserver> class.

Properties

Count

Gets the number of observers.

(Inherited from ObserverManager<TIdentity,TObserver>)
ExpirationDuration

Gets or sets the expiration time span, after which observers are lazily removed.

(Inherited from ObserverManager<TIdentity,TObserver>)
GetDateTime

Gets or sets the delegate used to get the date and time, for expiry.

(Inherited from ObserverManager<TIdentity,TObserver>)
Observers

Gets a copy of the observers.

(Inherited from ObserverManager<TIdentity,TObserver>)

Methods

Clear()

Removes all observers.

(Inherited from ObserverManager<TIdentity,TObserver>)
ClearExpired()

Removed all expired observers.

(Inherited from ObserverManager<TIdentity,TObserver>)
GetEnumerator()

Returns an enumerator that iterates through the collection.

(Inherited from ObserverManager<TIdentity,TObserver>)
Notify(Action<TObserver>, Func<TObserver,Boolean>)

Notifies all observers which match the provided predicate.

(Inherited from ObserverManager<TIdentity,TObserver>)
Notify(Func<TObserver,Task>, Func<TObserver,Boolean>)

Notifies all observers.

(Inherited from ObserverManager<TIdentity,TObserver>)
Subscribe(TIdentity, TObserver)

Ensures that the provided observer is subscribed, renewing its subscription.

(Inherited from ObserverManager<TIdentity,TObserver>)
Unsubscribe(TIdentity)

Ensures that the provided id is unsubscribed.

(Inherited from ObserverManager<TIdentity,TObserver>)

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

(Inherited from ObserverManager<TIdentity,TObserver>)

Extension Methods

BatchIEnumerable<T>(IEnumerable<T>, Int32)

Applies to