Table of Contents

Class ForeachAwaitPublisher

Namespace
Caesar.NotificationPublishers
Assembly
Caesar.dll

Default strategy: awaits each handler one after another, in the order the executors are given. The first exception stops the publish and propagates to the caller.

public sealed class ForeachAwaitPublisher : INotificationPublisher
Inheritance
ForeachAwaitPublisher
Implements
Inherited Members

Constructors

ForeachAwaitPublisher()

public ForeachAwaitPublisher()

Methods

Publish(IEnumerable<NotificationHandlerExecutor>, INotification, CancellationToken)

Invokes the handler executors for notification.

public Task Publish(IEnumerable<NotificationHandlerExecutor> handlerExecutors, INotification notification, CancellationToken cancellationToken)

Parameters

handlerExecutors IEnumerable<NotificationHandlerExecutor>

One executor per resolved handler: those for the notification's runtime type, in registration order, then those registered for its base classes and interfaces.

notification INotification

The notification being published.

cancellationToken CancellationToken

Cancellation token.

Returns

Task