Show / Hide Table of Contents

Class NotificationService

Implements a simple notification service.

Inheritance
object
NotificationService
NotificationBase<TMessage>
Implements
INotificationService
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Notification
Assembly: Sartorius.SAF.dll
Syntax
[Export(typeof(INotificationService))]
public class NotificationService : INotificationService

Methods

View Source

DoPublish<T>(T)

Publishes the notification to all subscribers.

Declaration
protected virtual void DoPublish<T>(T notification)
Parameters
Type Name Description
T notification

The arguments that are passed to the subscribers.

Type Parameters
Name Description
T
View Source

DoSubscribe<T>(Action<T>, bool, Predicate<T>)

Subscribes a delegate to an event.

Declaration
protected virtual SubscriptionToken DoSubscribe<T>(Action<T> action, bool keepSubscriberReferenceAlive, Predicate<T> filter)
Parameters
Type Name Description
Action<T> action

The delegate that gets executed when the payload is published.

bool keepSubscriberReferenceAlive

When true, the CompositePresentationEvent keeps a reference to the subscriber so it does not get garbage collected.

Predicate<T> filter

Filter to evaluate if the subscriber should receive the event.

Returns
Type Description
SubscriptionToken

A SubscriptionToken that uniquely identifies the added subscription.

Type Parameters
Name Description
T
View Source

DoUnsubscribe(SubscriptionToken)

Removes the subscriber matching the SubscriptionToken.

Declaration
protected virtual void DoUnsubscribe(SubscriptionToken subscriptionToken)
Parameters
Type Name Description
SubscriptionToken subscriptionToken

The SubscriptionToken.

Implements

INotificationService

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX