Class EventStreamIdAttribute
- Namespace
- Cratis.Chronicle.Events
- Assembly
- Cratis.Chronicle.dll
Attribute to specify the EventStreamId for a reactor or command.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = false)]
public sealed class EventStreamIdAttribute : Attribute
- Inheritance
-
EventStreamIdAttribute
- Inherited Members
- Extension Methods
Remarks
When applied to a reactor, the specified stream ID is used for side-effect events returned
from handler methods when no explicit EventStreamId is set on the
individual side-effect. Set concurrency to true to
include this value in the concurrency scope when appending events.
Constructors
EventStreamIdAttribute(string?, bool)
Attribute to specify the EventStreamId for a reactor or command.
public EventStreamIdAttribute(string? value = null, bool concurrency = false)
Parameters
valuestringThe EventStreamId value, or null / empty string to use NotSet (indicating the value should be provided dynamically via an interface such as
ICanProvideEventStreamId).concurrencyboolWhether to include this metadata in the concurrency scope when appending events. Default is false.
Remarks
When applied to a reactor, the specified stream ID is used for side-effect events returned
from handler methods when no explicit EventStreamId is set on the
individual side-effect. Set concurrency to true to
include this value in the concurrency scope when appending events.
Properties
Concurrency
Gets a value indicating whether this metadata should be included in the concurrency scope.
public bool Concurrency { get; }
Property Value
Value
Gets the EventStreamId value.
public EventStreamId Value { get; }