Class OnceOnlyAttribute
- Namespace
- Cratis.Chronicle.Reactors
- Assembly
- Cratis.Chronicle.dll
Attribute used to mark a reactor class or individual handler methods as non-replayable. When applied to a class, the entire reactor is excluded from all replay operations (redaction, revision, observer rewind). When applied to a method, only that handler is excluded from replay.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class OnceOnlyAttribute : Attribute
- Inheritance
-
OnceOnlyAttribute
- Inherited Members
- Extension Methods
Remarks
The two placements are enforced at different points. A class-level placement registers the reactor as non-replayable, so a replay of the observer never starts. A method-level placement leaves the reactor replayable - its other handlers still need to replay - and the marked handler is skipped for every event that arrives as part of a replay.
Constructors
OnceOnlyAttribute()
public OnceOnlyAttribute()