Class EventMigrationPropertyBuilder
- Namespace
- Cratis.Chronicle.Events.Migrations
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of IEventMigrationPropertyBuilder.
public class EventMigrationPropertyBuilder : IEventMigrationPropertyBuilder
- Inheritance
-
EventMigrationPropertyBuilder
- Implements
- Inherited Members
Properties
Properties
Gets the configured properties.
public IReadOnlyDictionary<PropertyExpression, JsonNode> Properties { get; }
Property Value
Methods
Combine(PropertyName, PropertySeparator, params PropertyName[])
Combine multiple source properties into a single target property by concatenation.
public void Combine(PropertyName targetProperty, PropertySeparator separator, params PropertyName[] sourceProperties)
Parameters
targetPropertyPropertyNameThe name of the property to write the combined result into.
separatorPropertySeparatorThe separator to use between the combined values.
sourcePropertiesPropertyName[]The source properties to concatenate.
DefaultValue(PropertyName, object)
Provide a default value for a new property that did not exist in the source generation.
public void DefaultValue(PropertyName targetProperty, object value)
Parameters
targetPropertyPropertyNameThe name of the property to set the default value on.
valueobjectThe default value.
RenamedFrom(PropertyName, PropertyName)
Rename a property from an old name to a new target property.
public void RenamedFrom(PropertyName targetProperty, PropertyName oldName)
Parameters
targetPropertyPropertyNameThe new name for the property.
oldNamePropertyNameThe old property name to read from.
Split(PropertyName, PropertyName, PropertySeparator, SplitPartIndex)
Split a source property value into a target property by extracting one part.
public void Split(PropertyName targetProperty, PropertyName sourceProperty, PropertySeparator separator, SplitPartIndex part)
Parameters
targetPropertyPropertyNameThe name of the property to write the split result into.
sourcePropertyPropertyNameThe source property to split.
separatorPropertySeparatorThe separator to use.
partSplitPartIndexThe zero-based part index to extract.