Class SetValueAttribute<TEvent>
- Namespace
- Cratis.Chronicle.Projections.ModelBound
- Assembly
- Cratis.Chronicle.dll
Attribute used to indicate that a property should be set to a constant value when an event of the specified type occurs.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = true)]
public sealed class SetValueAttribute<TEvent> : Attribute, IProjectionAnnotation, ISetValueAttribute, IEventBoundAttribute
Type Parameters
TEventThe type of event that triggers the value assignment.
- Inheritance
-
SetValueAttribute<TEvent>
- Implements
- Inherited Members
Constructors
SetValueAttribute(object)
Attribute used to indicate that a property should be set to a constant value when an event of the specified type occurs.
public SetValueAttribute(object value)
Parameters
valueobjectThe constant value to set. Must be a compile-time constant such as a string, number, boolean, or enum value.
Properties
EventType
Gets the type of event this attribute is bound to.
public Type EventType { get; }
Property Value
Value
Gets the constant value to set.
public object Value { get; }