Class NotProjectedAttribute

Namespace
Cratis.Chronicle.Projections.ModelBound
Assembly
Cratis.Chronicle.dll

Attribute used to declare that a read model member is deliberately not populated by the projection, because whatever reads the model assembles it.

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter)]
public sealed class NotProjectedAttribute : Attribute, IProjectionAnnotation
Inheritance
NotProjectedAttribute
Implements
Inherited Members
Extension Methods

Remarks

A projection may only consume events, never another read model, so a value that has to be joined in from a second read model can only be filled in by the query that serves the model. Without a way to say so, such a member is indistinguishable from one whose mapping was simply forgotten - which is exactly what the analyzers report it as. This states the intent, so the member is left alone: AutoMap will not bind it even when a subscribed event happens to carry the same name, and it is not reported as unmapped.

Constructors

NotProjectedAttribute()

public NotProjectedAttribute()