Class EventStreamAttribute<TSource>

Namespace
Cratis.Chronicle.ReadModels
Assembly
Cratis.Chronicle.dll

Declares a source-keyed read model whose state is folded from one event stream.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
public sealed class EventStreamAttribute<TSource> : Attribute where TSource : IEventSource

Type Parameters

TSource

The event source definition declaring the stream.

Inheritance
EventStreamAttribute<TSource>
Inherited Members
Extension Methods

Remarks

The model is implicitly passive. Reads must supply a stream scope. The definition's event source type filters both the fold and its guard; events written without that source type are not included.

Constructors

EventStreamAttribute(string)

Declares a source-keyed read model whose state is folded from one event stream.

public EventStreamAttribute(string stream)

Parameters

stream string

The declared stream name.

Remarks

The model is implicitly passive. Reads must supply a stream scope. The definition's event source type filters both the fold and its guard; events written without that source type are not included.

Properties

EventSource

Gets the event source definition type.

public Type EventSource { get; }

Property Value

Type

Stream

Gets the declared stream name.

public string Stream { get; }

Property Value

string