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
actionFunc<THandler, Task>The action to be executed for each handler.
scopedServiceProviderIServiceProviderThe scoped IServiceProvider. If not provided a new scope will be created.
invokeDuringShutdownboolSpecifies whether the callback must be called even if the application is shutting down.
Returns
Type Parameters
THandlerThe 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
actionAction<THandler>The action to be executed for each handler.
scopedServiceProviderIServiceProviderThe scoped IServiceProvider. If not provided a new scope will be created.
invokeDuringShutdownboolSpecifies whether the callback must be called even if the application is shutting down.
Type Parameters
THandlerThe type of the handler.