Class ValueMapBuilder<TFrom, TTo>

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

Represents an implementation of IValueMapBuilder<TFrom, TTo>.

public class ValueMapBuilder<TFrom, TTo> : IValueMapBuilder<TFrom, TTo>

Type Parameters

TFrom

The type of the value in the source generation.

TTo

The type of the value in the target generation.

Inheritance
ValueMapBuilder<TFrom, TTo>
Implements
IValueMapBuilder<TFrom, TTo>
Inherited Members
Extension Methods

Constructors

ValueMapBuilder()

public ValueMapBuilder()

Properties

Mappings

Gets the mappings that have been declared.

public IEnumerable<ValueMapping> Mappings { get; }

Property Value

IEnumerable<ValueMapping>

Methods

Map(TFrom, TTo)

State that a value in the source generation becomes a specific value in the target generation.

public IValueMapBuilder<TFrom, TTo> Map(TFrom from, TTo to)

Parameters

from TFrom

The value as it appears in the source generation.

to TTo

The value it becomes in the target generation.

Returns

IValueMapBuilder<TFrom, TTo>

The builder for continued configuration.

Remarks

Only values the map mentions are translated - anything else is carried across as it is, because a value the map stays silent about means the same thing in both generations.