Interface ITransactionalEventSequence
- Namespace
- Cratis.Chronicle.EventSequences
- Assembly
- Cratis.Chronicle.dll
Defines a transactional event sequence.
public interface ITransactionalEventSequence
- Extension Methods
Properties
UnitOfWork
Gets the current IUnitOfWork.
IUnitOfWork UnitOfWork { get; }
Property Value
Methods
Append(EventSourceId, object, EventStreamType?, EventStreamId?, EventSourceType?, ConcurrencyScope?, IEnumerable<string>?, DateTimeOffset?, Subject?)
Append a single event to the event store.
Task Append(EventSourceId eventSourceId, object @event, EventStreamType? eventStreamType = null, EventStreamId? eventStreamId = null, EventSourceType? eventSourceType = null, ConcurrencyScope? concurrencyScope = null, IEnumerable<string>? tags = null, DateTimeOffset? occurred = null, Subject? subject = null)
Parameters
eventSourceIdEventSourceIdThe EventSourceId to append for.
eventobjectThe event.
eventStreamTypeEventStreamTypeOptional EventStreamType to append to. Defaults to All.
eventStreamIdEventStreamIdOptional EventStreamId to append to. Defaults to Default.
eventSourceTypeEventSourceTypeOptional EventSourceType to append to. Defaults to Default.
concurrencyScopeConcurrencyScopeOptional ConcurrencyScope to use for concurrency control. Defaults to None.
tagsIEnumerable<string>Optional dynamic tags to associate with the event.
occurredDateTimeOffset?Optional timestamp for when the event occurred.
subjectSubjectOptional subject identifying what the event is about.
Returns
AppendMany(EventSourceId, IEnumerable<object>, EventStreamType?, EventStreamId?, EventSourceType?, ConcurrencyScope?, IEnumerable<string>?, DateTimeOffset?, Subject?)
Append a collection of events to the event store.
Task AppendMany(EventSourceId eventSourceId, IEnumerable<object> events, EventStreamType? eventStreamType = null, EventStreamId? eventStreamId = null, EventSourceType? eventSourceType = null, ConcurrencyScope? concurrencyScope = null, IEnumerable<string>? tags = null, DateTimeOffset? occurred = null, Subject? subject = null)
Parameters
eventSourceIdEventSourceIdThe EventSourceId to append for.
eventsIEnumerable<object>Collection of events to append.
eventStreamTypeEventStreamTypeOptional EventStreamType to append to. Defaults to All.
eventStreamIdEventStreamIdOptional EventStreamId to append to. Defaults to Default.
eventSourceTypeEventSourceTypeOptional EventSourceType to append to. Defaults to Default.
concurrencyScopeConcurrencyScopeOptional ConcurrencyScope to use for concurrency control. Defaults to None.
tagsIEnumerable<string>Optional dynamic tags to associate with the events.
occurredDateTimeOffset?Optional timestamp for when the events occurred.
subjectSubjectOptional subject identifying what the events are about.
Returns
AppendManyWithNamedTags(EventSourceId, IEnumerable<object>, IEnumerable<NamedTag>, EventStreamType?, EventStreamId?, EventSourceType?, ConcurrencyScope?, IEnumerable<string>?, DateTimeOffset?, Subject?)
Append events with structured named tags to the current unit of work.
Task AppendManyWithNamedTags(EventSourceId eventSourceId, IEnumerable<object> events, IEnumerable<NamedTag> namedTags, EventStreamType? eventStreamType = null, EventStreamId? eventStreamId = null, EventSourceType? eventSourceType = null, ConcurrencyScope? concurrencyScope = null, IEnumerable<string>? tags = null, DateTimeOffset? occurred = null, Subject? subject = null)
Parameters
eventSourceIdEventSourceIdThe event source.
eventsIEnumerable<object>The events.
namedTagsIEnumerable<NamedTag>Structured named tags for every event.
eventStreamTypeEventStreamTypeOptional stream type.
eventStreamIdEventStreamIdOptional stream id.
eventSourceTypeEventSourceTypeOptional source type.
concurrencyScopeConcurrencyScopeOptional concurrency scope.
tagsIEnumerable<string>Optional plain tags.
occurredDateTimeOffset?Optional occurred time.
subjectSubjectOptional subject.
Returns
- Task
Awaitable task.
Exceptions
- NamedTagsNotSupported
The implementation cannot carry nonempty named tags.
AppendWithNamedTags(EventSourceId, object, IEnumerable<NamedTag>, EventStreamType?, EventStreamId?, EventSourceType?, ConcurrencyScope?, IEnumerable<string>?, DateTimeOffset?, Subject?)
Append an event with structured named tags to the current unit of work.
Task AppendWithNamedTags(EventSourceId eventSourceId, object @event, IEnumerable<NamedTag> namedTags, EventStreamType? eventStreamType = null, EventStreamId? eventStreamId = null, EventSourceType? eventSourceType = null, ConcurrencyScope? concurrencyScope = null, IEnumerable<string>? tags = null, DateTimeOffset? occurred = null, Subject? subject = null)
Parameters
eventSourceIdEventSourceIdThe event source.
eventobjectThe event.
namedTagsIEnumerable<NamedTag>Structured named tags.
eventStreamTypeEventStreamTypeOptional stream type.
eventStreamIdEventStreamIdOptional stream id.
eventSourceTypeEventSourceTypeOptional source type.
concurrencyScopeConcurrencyScopeOptional concurrency scope.
tagsIEnumerable<string>Optional plain tags.
occurredDateTimeOffset?Optional occurred time.
subjectSubjectOptional subject.
Returns
- Task
Awaitable task.
Exceptions
- NamedTagsNotSupported
The implementation cannot carry nonempty named tags.