Table of Contents

Class ReducerAttribute

Namespace
Cratis.Chronicle.Reducers
Assembly
Cratis.Chronicle.dll

Optional attribute used to adorn classes to configure a reducer. The reducer will have to implement IReducerFor<TModel>.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class ReducerAttribute : Attribute
Inheritance
ReducerAttribute
Inherited Members

Remarks

Initializes a new instance of ReducerAttribute.

Constructors

ReducerAttribute(string, string?, bool)

Optional attribute used to adorn classes to configure a reducer. The reducer will have to implement IReducerFor<TModel>.

public ReducerAttribute(string id = "", string? eventSequence = null, bool isActive = true)

Parameters

id string

Optional identifier. If not specified, it will default to the fully qualified type name.

eventSequence string

Optional the name of the event sequence to observe. Defaults to the event log.

isActive bool

Optional whether or not the reducer is active or not. If its passive, it won't run actively on the Kernel.

Remarks

Initializes a new instance of ReducerAttribute.

Properties

EventSequenceId

Gets the unique identifier for an event sequence.

public EventSequenceId EventSequenceId { get; }

Property Value

EventSequenceId

Id

Gets the unique identifier for the reducer.

public ReducerId Id { get; }

Property Value

ReducerId

IsActive

Gets whether or not the reducer should be actively running on the Kernel.

public bool IsActive { get; }

Property Value

bool