Class ServiceCollectionExtensions
- Namespace
- CarrotMQ.Core.Configuration
- Assembly
- CarrotMQ.Core.dll
Extension methods for IServiceCollection to configure CarrotMQ.Core
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
- Inherited Members
Methods
AddCarrotMqCore(IServiceCollection)
Registers all required CarrotMQ.Core types
public static IServiceCollection AddCarrotMqCore(this IServiceCollection services)
Parameters
servicesIServiceCollection
Returns
AddMessageEnricher(IServiceCollection, Action<object, Context, CancellationToken>)
Add a delegate that will be called before the message is sent. Use it to alter the message or the context for all messages.
public static IServiceCollection AddMessageEnricher(this IServiceCollection services, Action<object, Context, CancellationToken> enrich)
Parameters
servicesIServiceCollectionThe IServiceCollection to configure
enrichAction<object, Context, CancellationToken>The delegate to be invoked
Returns
- IServiceCollection
The configured IServiceCollection