Class VariantOfAttribute<TIdentity>
- Assembly
- Cratis.Chronicle.dll
Attribute used to indicate that a read model is one of several mutually exclusive representations of the same
logical entity. Every type marked with this attribute for the same TIdentity forms a
group: entering one variant (see EntersOnAttribute<TEvent>) removes the entity from every other
variant in the group.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = false)]
public sealed class VariantOfAttribute<TIdentity> : Attribute, IProjectionAnnotation
Type Parameters
TIdentityThe type that anchors the logical identity shared by every variant in the group. It does not need to be a read model itself, and it does not need a common CLR base type with any of the variants.
- Inheritance
-
VariantOfAttribute<TIdentity>
- Implements
- Inherited Members
- Extension Methods
Constructors
VariantOfAttribute()
public VariantOfAttribute()
Properties
Identity
Gets the type that anchors the logical identity shared by every variant in the group.
public Type Identity { get; }