Table of Contents

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

services IServiceCollection

Returns

IServiceCollection

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

services IServiceCollection

The IServiceCollection to configure

enrich Action<object, Context, CancellationToken>

The delegate to be invoked

Returns

IServiceCollection

The configured IServiceCollection