Class FromEveryAttribute
- Namespace
- Cratis.Chronicle.Projections.ModelBound
- Assembly
- Cratis.Chronicle.dll
Attribute used to indicate that a property value should be set from every event. Can either map from an event property or an event context property.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = false)]
public sealed class FromEveryAttribute : Attribute, IProjectionAnnotation
- Inheritance
-
FromEveryAttribute
- Implements
- Inherited Members
Constructors
FromEveryAttribute(string?, string?)
Attribute used to indicate that a property value should be set from every event. Can either map from an event property or an event context property.
public FromEveryAttribute(string? property = null, string? contextProperty = null)
Parameters
propertystringOptional name of the property on the event. If not specified, uses the model property name.
contextPropertystringOptional name of the property on the event context. If not specified, uses the model property name.
Properties
ContextProperty
Gets or sets the name of the event context property (if mapping from event context).
public string? ContextProperty { get; set; }
Property Value
Property
Gets or sets the name of the property on the event (if mapping from event property).
public string? Property { get; set; }