Class ProjectionAttribute
- Namespace
- Cratis.Chronicle.Projections
- Assembly
- Cratis.Chronicle.dll
Optional attribute used to adorn classes to configure a projection. The projection will have to implement IProjectionFor<TModel>.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class ProjectionAttribute : Attribute
- Inheritance
-
ProjectionAttribute
- Inherited Members
Remarks
Initializes a new instance of ProjectionAttribute.
Constructors
ProjectionAttribute(string, string?)
Optional attribute used to adorn classes to configure a projection. The projection will have to implement IProjectionFor<TModel>.
public ProjectionAttribute(string id = "", string? eventSequence = null)
Parameters
id
stringOptional identifier. If not specified, it will default to the fully qualified type name.
eventSequence
stringOptional the name of the event sequence to observe. Defaults to the event log.
Remarks
Initializes a new instance of ProjectionAttribute.
Properties
EventSequenceId
Gets the unique identifier for an event sequence.
public EventSequenceId EventSequenceId { get; }
Property Value
Id
Gets the unique identifier for the reducer.
public ProjectionId Id { get; }