Class SetFromAttribute<TEvent>
- Namespace
- Cratis.Chronicle.Projections.ModelBound
- Assembly
- Cratis.Chronicle.dll
Attribute used to indicate that a property value should be set from an event property.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = true)]
public sealed class SetFromAttribute<TEvent> : Attribute, IProjectionAnnotation, ISetFromAttribute, IEventBoundAttribute, ICanMapToEventProperty
Type Parameters
TEventThe type of event to set from.
- Inheritance
-
SetFromAttribute<TEvent>
- Implements
- Inherited Members
Constructors
SetFromAttribute(string?)
Attribute used to indicate that a property value should be set from an event property.
public SetFromAttribute(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; }