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
TFromThe type of the value in the source generation.
TToThe 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
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
fromTFromThe value as it appears in the source generation.
toTToThe 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.