Table of Contents

Class SerializationDispatchBuilderExtensions

Namespace
Microsoft.Extensions.DependencyInjection
Assembly
Excalibur.Dispatch.dll

Extension methods for configuring message serialization in the dispatch system. Provides methods to register serializers and configure serialization behavior.

public static class SerializationDispatchBuilderExtensions
Inheritance
SerializationDispatchBuilderExtensions
Inherited Members

Methods

AddDispatchSerializer(IDispatchBuilder)

Adds the default dispatch message serializer to the builder. Registers the default JSON-based message serialization services.

public static IDispatchBuilder AddDispatchSerializer(this IDispatchBuilder builder)

Parameters

builder IDispatchBuilder

The dispatch builder to configure.

Returns

IDispatchBuilder

The dispatch builder for method chaining.

Exceptions

ArgumentNullException

Thrown when builder is null.

AddDispatchSerializer<TSerializer>(IDispatchBuilder, int)

Adds a custom message serializer implementation to the builder with a specific version. Enables registration of alternative serialization strategies with versioning support.

public static IDispatchBuilder AddDispatchSerializer<TSerializer>(this IDispatchBuilder builder, int version) where TSerializer : class

Parameters

builder IDispatchBuilder

The dispatch builder to configure.

version int

The version number for the serializer implementation.

Returns

IDispatchBuilder

The dispatch builder for method chaining.

Type Parameters

TSerializer

The type of serializer to register.

Exceptions

ArgumentNullException

Thrown when builder is null.