Table of Contents

Interface IBrokerClientCallbacksInvoker

Namespace
Silverback.Messaging.Broker.Callbacks
Assembly
Silverback.Integration.dll

Used to invoke the registered IBrokerClientCallback.

public interface IBrokerClientCallbacksInvoker

Methods

InvokeAsync<THandler>(Func<THandler, Task>, IServiceProvider?, bool)

Resolves and invokes all handlers of the specified type.

ValueTask InvokeAsync<THandler>(Func<THandler, Task> action, IServiceProvider? scopedServiceProvider = null, bool invokeDuringShutdown = true)

Parameters

action Func<THandler, Task>

The action to be executed for each handler.

scopedServiceProvider IServiceProvider

The scoped IServiceProvider. If not provided a new scope will be created.

invokeDuringShutdown bool

Specifies whether the callback must be called even if the application is shutting down.

Returns

ValueTask

A Task representing the asynchronous operation.

Type Parameters

THandler

The type of the handler.

Invoke<THandler>(Action<THandler>, IServiceProvider?, bool)

Resolves and invokes all handlers of the specified type.

void Invoke<THandler>(Action<THandler> action, IServiceProvider? scopedServiceProvider = null, bool invokeDuringShutdown = true)

Parameters

action Action<THandler>

The action to be executed for each handler.

scopedServiceProvider IServiceProvider

The scoped IServiceProvider. If not provided a new scope will be created.

invokeDuringShutdown bool

Specifies whether the callback must be called even if the application is shutting down.

Type Parameters

THandler

The type of the handler.