Table of Contents

Class SetBuilder<TModel, TEvent, TParentBuilder>

Namespace
Cratis.Chronicle.Projections
Assembly
Cratis.Chronicle.dll
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)

public SetBuilder(TParentBuilder parent, PropertyPath targetProperty, bool forceEventProperty = false)

Parameters

parent TParentBuilder

Parent builder.

targetProperty PropertyPath

Target property we're building for.

forceEventProperty bool

Whether 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

IEventValueExpression

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 PropertyPath

Cratis.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.