Class MessageMappingServiceCollectionExtensions
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- Excalibur.Dispatch.dll
Extension methods for configuring message mapping via dependency injection.
public static class MessageMappingServiceCollectionExtensions
- Inheritance
-
MessageMappingServiceCollectionExtensions
- Inherited Members
Methods
AddMessageMapper(IDispatchBuilder, IMessageMapper)
Registers a custom message mapper instance with the dispatch builder.
public static IDispatchBuilder AddMessageMapper(this IDispatchBuilder builder, IMessageMapper mapper)
Parameters
builderIDispatchBuilderThe dispatch builder.
mapperIMessageMapperThe mapper instance to register.
Returns
- IDispatchBuilder
The dispatch builder for fluent configuration.
AddMessageMapper<TMapper>(IDispatchBuilder)
Registers a custom message mapper with the dispatch builder.
public static IDispatchBuilder AddMessageMapper<TMapper>(this IDispatchBuilder builder) where TMapper : class, IMessageMapper
Parameters
builderIDispatchBuilderThe dispatch builder.
Returns
- IDispatchBuilder
The dispatch builder for fluent configuration.
Type Parameters
TMapperThe type of mapper to register.
AddMessageMapping(IServiceCollection)
Adds message mapping services to the service collection.
public static IServiceCollection AddMessageMapping(this IServiceCollection services)
Parameters
servicesIServiceCollectionThe service collection.
Returns
- IServiceCollection
The service collection for chaining.
AddMessageMapping(IServiceCollection, Action<IMessageMappingBuilder>)
Adds message mapping services with configuration to the service collection.
public static IServiceCollection AddMessageMapping(this IServiceCollection services, Action<IMessageMappingBuilder> configure)
Parameters
servicesIServiceCollectionThe service collection.
configureAction<IMessageMappingBuilder>Action to configure message mapping.
Returns
- IServiceCollection
The service collection for chaining.
UseDefaultMessageMappers(IDispatchBuilder)
Adds default message mappers (RabbitMQ↔Kafka, etc.) to the dispatch builder.
public static IDispatchBuilder UseDefaultMessageMappers(this IDispatchBuilder builder)
Parameters
builderIDispatchBuilderThe dispatch builder.
Returns
- IDispatchBuilder
The dispatch builder for fluent configuration.
WithMessageMapping(IDispatchBuilder, Action<IMessageMappingBuilder>)
Configures message mapping for the dispatch builder.
public static IDispatchBuilder WithMessageMapping(this IDispatchBuilder builder, Action<IMessageMappingBuilder> configure)
Parameters
builderIDispatchBuilderThe dispatch builder.
configureAction<IMessageMappingBuilder>Action to configure message mapping.
Returns
- IDispatchBuilder
The dispatch builder for fluent configuration.