Class AddFromAttribute<TEvent>
- Namespace
- Cratis.Chronicle.Projections.ModelBound
- Assembly
- Cratis.Chronicle.dll
Attribute used to indicate that a property value should be added from an event property.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = true)]
public sealed class AddFromAttribute<TEvent> : Attribute, IProjectionAnnotation, IAddFromAttribute, IEventBoundAttribute, ICanMapToEventProperty
Type Parameters
TEventThe type of event to add from.
- Inheritance
-
AddFromAttribute<TEvent>
- Implements
- Inherited Members
Constructors
AddFromAttribute(string?)
Attribute used to indicate that a property value should be added from an event property.
public AddFromAttribute(string? eventPropertyName = null)
Parameters
eventPropertyNamestringOptional name of the property on the event. If not specified, uses the model property name.
Properties
EventPropertyName
Gets the name of the property on the event.
public string? EventPropertyName { get; }
Property Value
EventType
Gets the type of event this attribute is bound to.
public Type EventType { get; }