Table of Contents

Class NamedEventExtensions

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

Names events for storage, once, before any of them is written.

public static class NamedEventExtensions
Inheritance
NamedEventExtensions
Inherited Members

Methods

AsNamedEvents(IEnumerable<IDomainEvent>)

Pairs each event with the name it is stored under.

public static IReadOnlyList<NamedEvent> AsNamedEvents(this IEnumerable<IDomainEvent> events)

Parameters

events IEnumerable<IDomainEvent>

The events about to be written.

Returns

IReadOnlyList<NamedEvent>

The events in the order given, each carrying its stored name.

Remarks

A store persists the name it is handed rather than working one out. Ten stores each deriving their own agreed by convention rather than by construction -- they matched because they were changed together, and an inventory of the places that name a message has already missed several.

Every event is named before any is written, so a batch containing one undeclared event fails before the store has persisted part of it.

Exceptions

ArgumentNullException

events is null.

InvalidOperationException

An event's type declares no name.