Table of Contents

Class TransactionalEventSequence

Namespace
Cratis.Chronicle.EventSequences
Assembly
Cratis.Chronicle.dll

Represents an implementation of ITransactionalEventSequence.

public class TransactionalEventSequence : ITransactionalEventSequence
Inheritance
TransactionalEventSequence
Implements
Inherited Members

Constructors

TransactionalEventSequence(IEventSequence, IUnitOfWorkManager)

Represents an implementation of ITransactionalEventSequence.

public TransactionalEventSequence(IEventSequence eventSequence, IUnitOfWorkManager unitOfWorkManager)

Parameters

eventSequence IEventSequence

The target IEventSequence.

unitOfWorkManager IUnitOfWorkManager

IUnitOfWorkManager for working with the unit of work.

Fields

CausationType

The causation type for the transactional event sequence.

public static readonly CausationType CausationType

Field Value

CausationType

TransactionalEventSequenceIdProperty

The event sequence id causation property.

public const string TransactionalEventSequenceIdProperty = "eventSequenceId"

Field Value

string

Properties

UnitOfWork

Gets the current IUnitOfWork.

public IUnitOfWork UnitOfWork { get; }

Property Value

IUnitOfWork

Methods

Append(EventSourceId, object, EventStreamType?, EventStreamId?, EventSourceType?, ConcurrencyScope?)

Append a single event to the event store.

public Task Append(EventSourceId eventSourceId, object @event, EventStreamType? eventStreamType = null, EventStreamId? eventStreamId = null, EventSourceType? eventSourceType = null, ConcurrencyScope? concurrencyScope = null)

Parameters

eventSourceId EventSourceId

The EventSourceId to append for.

event object

The event.

eventStreamType EventStreamType

Optional EventStreamType to append to. Defaults to All.

eventStreamId EventStreamId

Optional EventStreamId to append to. Defaults to Default.

eventSourceType EventSourceType

Optional EventSourceType to append to. Defaults to Default.

concurrencyScope ConcurrencyScope

Optional ConcurrencyScope to use for concurrency control. Defaults to None.

Returns

Task

Awaitable Task.

AppendMany(EventSourceId, IEnumerable<object>, EventStreamType?, EventStreamId?, EventSourceType?, ConcurrencyScope?)

Append a collection of events to the event store.

public Task AppendMany(EventSourceId eventSourceId, IEnumerable<object> events, EventStreamType? eventStreamType = null, EventStreamId? eventStreamId = null, EventSourceType? eventSourceType = null, ConcurrencyScope? concurrencyScope = null)

Parameters

eventSourceId EventSourceId

The EventSourceId to append for.

events IEnumerable<object>

Collection of events to append.

eventStreamType EventStreamType

Optional EventStreamType to append to. Defaults to All.

eventStreamId EventStreamId

Optional EventStreamId to append to. Defaults to Default.

eventSourceType EventSourceType

Optional EventSourceType to append to. Defaults to Default.

concurrencyScope ConcurrencyScope

Optional ConcurrencyScope to use for concurrency control. Defaults to None.

Returns

Task

Awaitable Task.