Table of Contents

Interface IPublisher

Namespace: Apollo.Abstractions
Assembly: Apollo.dll

public interface IPublisher

Methods

Broadcast<TEvent>(TEvent, CancellationToken)

Task Broadcast<TEvent>(TEvent eventMessage, CancellationToken cancellationToken = default) where TEvent : IEvent

Parameters

eventMessage TEvent

cancellationToken CancellationToken

Returns

Task

Type Parameters

TEvent

Request<TRequest, TResponse>(TRequest, CancellationToken)

Task<TResponse?> Request<TRequest, TResponse>(TRequest requestMessage, CancellationToken cancellationToken = default) where TRequest : IRequest<TResponse>

Parameters

requestMessage TRequest

cancellationToken CancellationToken

Returns

Task<TResponse?>

Type Parameters

TRequest

TResponse

Send<TCommand>(TCommand, CancellationToken)

Task Send<TCommand>(TCommand commandMessage, CancellationToken cancellationToken = default) where TCommand : ICommand

Parameters

commandMessage TCommand

cancellationToken CancellationToken

Returns

Task

Type Parameters

TCommand