Class SetBuilder<TModel, TEvent, TParentBuilder>
- Namespace
- Cratis.Chronicle.Projections
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of ISetBuilder<TModel, TEvent, TProperty, TParentBuilder>.
public class SetBuilder<TModel, TEvent, TParentBuilder> : ISetBuilder<TModel, TEvent, TParentBuilder>, IPropertyExpressionBuilder
Type Parameters
TModel
Model to build for.
TEvent
Event to build for.
TParentBuilder
Type of the parent builder.
- Inheritance
-
SetBuilder<TModel, TEvent, TParentBuilder>
- Implements
-
ISetBuilder<TModel, TEvent, TParentBuilder>
- Derived
-
SetBuilder<TModel, TEvent, TProperty, TParentBuilder>
- Inherited Members
Remarks
Initializes a new instance of the SetBuilder<TModel, TEvent, TProperty, TParentBuilder> class.
Constructors
SetBuilder(TParentBuilder, PropertyPath, bool)
Represents an implementation of ISetBuilder<TModel, TEvent, TProperty, TParentBuilder>.
public SetBuilder(TParentBuilder parent, PropertyPath targetProperty, bool forceEventProperty = false)
Parameters
parent
TParentBuilderParent builder.
targetProperty
PropertyPathTarget property we're building for.
forceEventProperty
boolWhether or not to force this to have to map to a target property or not.
Remarks
Initializes a new instance of the SetBuilder<TModel, TEvent, TProperty, TParentBuilder> class.
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
propertyPath
PropertyPathCratis.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.