Class CountAttribute<TEvent>
- Namespace
- Cratis.Chronicle.Projections.ModelBound
- Assembly
- Cratis.Chronicle.dll
Attribute used to indicate that a property value should count occurrences of an event.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = true)]
public sealed class CountAttribute<TEvent> : Attribute, IProjectionAnnotation, ICountAttribute, IEventBoundAttribute
Type Parameters
TEventThe type of event to count.
- Inheritance
-
CountAttribute<TEvent>
- Implements
- Inherited Members
Properties
ConstantKey
Gets a constant value to use as the key. All events of this type will update the same read model instance.
public string? ConstantKey { get; init; }
Property Value
EventType
Gets the type of event this attribute is bound to.
public Type EventType { get; }