Show / Hide Table of Contents

Interface INotificationService

Defines methods to publish notifications.

Namespace: Sartorius.SAF.Notification
Assembly: Sartorius.SAF.dll
Syntax
public interface INotificationService

Methods

View Source

Publish<T>(T)

Publishes the specific notification.

Declaration
void Publish<T>(T notification)
Parameters
Type Name Description
T notification

The payload.

Type Parameters
Name Description
T

The notification type.

View Source

Subscribe<T>(Action<T>)

Subscribes the action to the notifications of T.

Declaration
SubscriptionToken Subscribe<T>(Action<T> action)
Parameters
Type Name Description
System.Action<T> action

The System.Action<T> that is invoked when the notification is published.

Returns
Type Description
SubscriptionToken

A SubscriptionToken.

Type Parameters
Name Description
T

The notification type.

View Source

Subscribe<T>(Action<T>, Predicate<T>)

Subscribes the action with the given filter to the notifications of T.

Declaration
SubscriptionToken Subscribe<T>(Action<T> action, Predicate<T> filter)
Parameters
Type Name Description
System.Action<T> action

The System.Action<T> that is invoked when the notification is published.

System.Predicate<T> filter

The filter System.Predicate<T> that defines whether the notification is published to the subscriber.

Returns
Type Description
SubscriptionToken

A SubscriptionToken.

Type Parameters
Name Description
T

The payload type.

View Source

Unsubscribe(SubscriptionToken)

Removes the subscriber matching the SubscriptionToken.

Declaration
void Unsubscribe(SubscriptionToken subscriptionToken)
Parameters
Type Name Description
SubscriptionToken subscriptionToken

The SubscriptionToken.

Extension Methods

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