Interface IFromAllBuilder<TReadModel>
- Namespace
- Cratis.Chronicle.Projections
- Assembly
- Cratis.Chronicle.dll
Defines the builder for building properties that can be set by all event types.
public interface IFromAllBuilder<TReadModel>
Type Parameters
TReadModelType of read model to build for.
- Extension Methods
Methods
Count<TValue>(Expression<Func<TReadModel, IDictionary<string, TValue>>>, Expression<Func<EventContext, object>>)
Count every event towards a key in a dictionary-typed property on the read model, where the key is resolved dynamically, per event, from the EventContext.
IFromAllBuilder<TReadModel> Count<TValue>(Expression<Func<TReadModel, IDictionary<string, TValue>>> readModelPropertyAccessor, Expression<Func<EventContext, object>> dynamicKeyAccessor)
Parameters
readModelPropertyAccessorExpression<Func<TReadModel, IDictionary<string, TValue>>>Read model property accessor for the dictionary-typed target property.
dynamicKeyAccessorExpression<Func<EventContext, object>>Accessor for the EventContext property to derive the dictionary key from.
Returns
- IFromAllBuilder<TReadModel>
Builder continuation.
Type Parameters
TValueType of the dictionary value.
Count<TProperty>(Expression<Func<TReadModel, TProperty>>)
Count every event towards a property on the read model.
IFromAllBuilder<TReadModel> Count<TProperty>(Expression<Func<TReadModel, TProperty>> readModelPropertyAccessor)
Parameters
readModelPropertyAccessorExpression<Func<TReadModel, TProperty>>Read model property accessor for defining the target property.
Returns
- IFromAllBuilder<TReadModel>
Builder continuation.
Type Parameters
TPropertyType of the property.
Decrement<TValue>(Expression<Func<TReadModel, IDictionary<string, TValue>>>, Expression<Func<EventContext, object>>)
Decrement a key in a dictionary-typed property on the read model, where the key is resolved dynamically, per event, from the EventContext.
IFromAllBuilder<TReadModel> Decrement<TValue>(Expression<Func<TReadModel, IDictionary<string, TValue>>> readModelPropertyAccessor, Expression<Func<EventContext, object>> dynamicKeyAccessor)
Parameters
readModelPropertyAccessorExpression<Func<TReadModel, IDictionary<string, TValue>>>Read model property accessor for the dictionary-typed target property.
dynamicKeyAccessorExpression<Func<EventContext, object>>Accessor for the EventContext property to derive the dictionary key from.
Returns
- IFromAllBuilder<TReadModel>
Builder continuation.
Type Parameters
TValueType of the dictionary value.
Decrement<TProperty>(Expression<Func<TReadModel, TProperty>>)
Decrement a property on the read model for every event.
IFromAllBuilder<TReadModel> Decrement<TProperty>(Expression<Func<TReadModel, TProperty>> readModelPropertyAccessor)
Parameters
readModelPropertyAccessorExpression<Func<TReadModel, TProperty>>Read model property accessor for defining the target property.
Returns
- IFromAllBuilder<TReadModel>
Builder continuation.
Type Parameters
TPropertyType of the property.
Increment<TValue>(Expression<Func<TReadModel, IDictionary<string, TValue>>>, Expression<Func<EventContext, object>>)
Increment a key in a dictionary-typed property on the read model, where the key is resolved dynamically, per event, from the EventContext.
IFromAllBuilder<TReadModel> Increment<TValue>(Expression<Func<TReadModel, IDictionary<string, TValue>>> readModelPropertyAccessor, Expression<Func<EventContext, object>> dynamicKeyAccessor)
Parameters
readModelPropertyAccessorExpression<Func<TReadModel, IDictionary<string, TValue>>>Read model property accessor for the dictionary-typed target property.
dynamicKeyAccessorExpression<Func<EventContext, object>>Accessor for the EventContext property to derive the dictionary key from.
Returns
- IFromAllBuilder<TReadModel>
Builder continuation.
Type Parameters
TValueType of the dictionary value.
Increment<TProperty>(Expression<Func<TReadModel, TProperty>>)
Increment a property on the read model for every event.
IFromAllBuilder<TReadModel> Increment<TProperty>(Expression<Func<TReadModel, TProperty>> readModelPropertyAccessor)
Parameters
readModelPropertyAccessorExpression<Func<TReadModel, TProperty>>Read model property accessor for defining the target property.
Returns
- IFromAllBuilder<TReadModel>
Builder continuation.
Type Parameters
TPropertyType of the property.
Set<TProperty>(Expression<Func<TReadModel, TProperty>>)
Start building the set operation to a target property on the read model.
IAllSetBuilder<TReadModel, IFromAllBuilder<TReadModel>> Set<TProperty>(Expression<Func<TReadModel, TProperty>> readModelPropertyAccessor)
Parameters
readModelPropertyAccessorExpression<Func<TReadModel, TProperty>>Read model property accessor for defining the target property.
Returns
- IAllSetBuilder<TReadModel, IFromAllBuilder<TReadModel>>
The IAllSetBuilder<TReadModel, TParentBuilder> to build up the property expressions.
Type Parameters
TPropertyType of the property.