Table of Contents

Interface IEventPublisher<TEvent>

Namespace
AnyProtocol.Abstraction
Assembly
AnyProtocol.Abstraction.dll

Defines operations for event publisher.

public interface IEventPublisher<in TEvent> where TEvent : class

Type Parameters

TEvent

The event type.

Methods

PublishAsync(TEvent, CancellationToken)

Publishes a message to all subscribers of its configured channel.

ValueTask PublishAsync(TEvent @event, CancellationToken cancellationToken = default)

Parameters

event TEvent

The event.

cancellationToken CancellationToken

The token used to cancel the operation.

Returns

ValueTask

A task that represents the asynchronous operation.