Table of Contents

Interface IEventTypeRegistry

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

AOT-safe type registry for resolving event types by name without reflection.

public interface IEventTypeRegistry
Extension Methods

Remarks

Implementations provide compile-time type mappings (e.g., from source generators) instead of runtime Type.GetType() / Assembly.GetType() calls.

The default implementation wraps the source-generated EventStoreTypeMap class produced by EventStoreTypeMapGenerator.

Methods

GetTypeName(Type)

Gets the stored type name for an event type.

string? GetTypeName(Type eventType)

Parameters

eventType Type

The event type.

Returns

string

The type name for storage, or null if the type is not registered.

ResolveType(string)

Resolves an event type from its stored type name.

Type? ResolveType(string eventTypeName)

Parameters

eventTypeName string

The event type name as stored in the event store.

Returns

Type

The resolved Type, or null if the type is not registered.