Class AddBuilder<TModel, TEvent, TProperty, TParentBuilder>
- Namespace
- Cratis.Chronicle.Projections
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of IAddBuilder<TModel, TEvent, TProperty, TParentBuilder>.
public class AddBuilder<TModel, TEvent, TProperty, TParentBuilder> : IAddBuilder<TModel, TEvent, TProperty, TParentBuilder>, IPropertyExpressionBuilder where TParentBuilder : class, IModelPropertiesBuilder<TModel, TEvent, TParentBuilder>
Type Parameters
TModel
Model to build for.
TEvent
Event to build for.
TProperty
The type of the property we're targeting.
TParentBuilder
Type of the parent builder.
- Inheritance
-
AddBuilder<TModel, TEvent, TProperty, TParentBuilder>
- Implements
-
IAddBuilder<TModel, TEvent, TProperty, TParentBuilder>
- Inherited Members
Remarks
Initializes a new instance of the AddBuilder<TModel, TEvent, TProperty, TParentBuilder> class.
Constructors
AddBuilder(TParentBuilder, PropertyPath)
Represents an implementation of IAddBuilder<TModel, TEvent, TProperty, TParentBuilder>.
public AddBuilder(TParentBuilder parent, PropertyPath targetProperty)
Parameters
parent
TParentBuilderParent builder.
targetProperty
PropertyPathTarget property we're building for.
Remarks
Initializes a new instance of the AddBuilder<TModel, TEvent, TProperty, TParentBuilder> class.
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.
With(Expression<Func<TEvent, TProperty>>)
Add with a property on the event.
public TParentBuilder With(Expression<Func<TEvent, TProperty>> eventPropertyAccessor)
Parameters
eventPropertyAccessor
Expression<Func<TEvent, TProperty>>Event property accessor for defining the source property.
Returns
- TParentBuilder
Builder continuation.