Interface IEventSequenceOperations
- Namespace
- Cratis.Chronicle.EventSequences.Operations
- Assembly
- Cratis.Chronicle.dll
Defines operations related to an event sequence.
public interface IEventSequenceOperations
Properties
EventSequence
Gets the event sequence that these operations are associated with.
IEventSequence EventSequence { get; }
Property Value
Methods
Clear()
Clears all operations that has been added.
void Clear()
ForEventSourceId(EventSourceId, Action<EventSourceOperations>)
Configures operations for a specific event source identified by eventSourceId.
EventSequenceOperations ForEventSourceId(EventSourceId eventSourceId, Action<EventSourceOperations> configure)
Parameters
eventSourceIdEventSourceIdThe identifier of the event source.
configureAction<EventSourceOperations>Action to configure the operations for the event source.
Returns
- EventSequenceOperations
The current instance of EventSequenceOperations.
GetAppendedEvents()
Gets the events that have been appended in the operation builders.
IEnumerable<object> GetAppendedEvents()
Returns
- IEnumerable<object>
Collection of events.
GetEventsToAppend()
Gets the events to append as EventForEventSourceId records, preserving the order they will be sent to the server.
IReadOnlyList<EventForEventSourceId> GetEventsToAppend()
Returns
- IReadOnlyList<EventForEventSourceId>
A read-only list of EventForEventSourceId in append order.
Perform()
Performs the operation, appending events as specified in the builders.
Task<AppendManyResult> Perform()
Returns
- Task<AppendManyResult>
An instance of AppendManyResult representing the result of the operation.
WithCausation(Causation)
Sets the causation for the operation.
EventSequenceOperations WithCausation(Causation causation)
Parameters
causationCausationThe causation to set.
Returns
- EventSequenceOperations
The current instance of EventSequenceOperations.