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