Table of Contents

Method Publish

Namespace
Mediarion
Assembly
Mediarion.dll

Publish<TNotification>(TNotification, CancellationToken)

Publishes a notification.

public Task Publish<TNotification>(TNotification notification, CancellationToken cancellationToken = default) where TNotification : INotification

Parameters

notification TNotification

The notification.

cancellationToken CancellationToken

Cancels the operation.

Returns

Task

A task that completes when the handlers are done.

Type Parameters

TNotification

The notification type.

Publish(object, CancellationToken)

Publishes a notification whose type is only known at run time.

public Task Publish(object notification, CancellationToken cancellationToken = default)

Parameters

notification object

The notification.

cancellationToken CancellationToken

Cancels the operation.

Returns

Task

A task that completes when the handlers are done.