Table of Contents

Interface IEventTypeMigrationFor<TUpgrade, TPrevious>

Namespace
Cratis.Chronicle.Events.Migrations
Assembly
Cratis.Chronicle.dll

Defines a type-safe migrator between two generations of the same event type.

public interface IEventTypeMigrationFor<TUpgrade, TPrevious> : IEventTypeMigrationFor<TUpgrade>, IEventTypeMigration

Type Parameters

TUpgrade

The upgraded (newer generation) event type.

TPrevious

The previous (older generation) event type.

Inherited Members

Remarks

Implementors should extend EventTypeMigration<TUpgrade, TPrevious> instead of implementing this interface directly. The abstract base class handles generation extraction, validation, and the untyped IEventTypeMigration plumbing automatically.

Methods

Downcast(IEventMigrationBuilder<TPrevious, TUpgrade>)

Define the type-safe downcast migration from TUpgrade to TPrevious.

void Downcast(IEventMigrationBuilder<TPrevious, TUpgrade> builder)

Parameters

builder IEventMigrationBuilder<TPrevious, TUpgrade>

The IEventMigrationBuilder<TTarget, TSource> to use.

Upcast(IEventMigrationBuilder<TUpgrade, TPrevious>)

Define the type-safe upcast migration from TPrevious to TUpgrade.

void Upcast(IEventMigrationBuilder<TUpgrade, TPrevious> builder)

Parameters

builder IEventMigrationBuilder<TUpgrade, TPrevious>

The IEventMigrationBuilder<TTarget, TSource> to use.