Class SetBuilder<TReadModel, TEvent, TParentBuilder>
- Namespace
- Cratis.Chronicle.Projections
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of ISetBuilder<TReadModel, TEvent, TProperty, TParentBuilder>.
public class SetBuilder<TReadModel, TEvent, TParentBuilder> : ISetBuilder<TReadModel, TEvent, TParentBuilder>, IPropertyExpressionBuilder
Type Parameters
TReadModelRead model to build for.
TEventEvent to build for.
TParentBuilderType of the parent builder.
- Inheritance
-
SetBuilder<TReadModel, TEvent, TParentBuilder>
- Implements
-
ISetBuilder<TReadModel, TEvent, TParentBuilder>
- Derived
- Inherited Members
Constructors
SetBuilder(TParentBuilder, PropertyPath, INamingPolicy, bool)
Represents an implementation of ISetBuilder<TReadModel, TEvent, TProperty, TParentBuilder>.
public SetBuilder(TParentBuilder parent, PropertyPath targetProperty, INamingPolicy namingPolicy, bool forceEventProperty = false)
Parameters
parentTParentBuilderParent builder.
targetPropertyPropertyPathTarget property we're building for.
namingPolicyINamingPolicyThe INamingPolicy to use for converting names during serialization.
forceEventPropertyboolWhether or not to force this to have to map to a target property or not.
Fields
_expression
protected IEventValueExpression? _expression
Field Value
Properties
TargetProperty
Gets the target property.
public PropertyPath TargetProperty { get; }
Property Value
- PropertyPath
Methods
Build()
Builds the expression.
public string Build()
Returns
- string
The expression built.
To(PropertyPath)
Straight map to a property on the event, based on the Cratis.Chronicle.Properties.PropertyPath.
public TParentBuilder To(PropertyPath propertyPath)
Parameters
propertyPathPropertyPathCratis.Chronicle.Properties.PropertyPath to map to.
Returns
- TParentBuilder
Builder continuation.
ToEventSourceId()
Map to the event source id on the metadata of the event.
public TParentBuilder ToEventSourceId()
Returns
- TParentBuilder
Builder continuation.