Class EventSequenceOperations
- Namespace
- Cratis.Chronicle.EventSequences.Operations
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of IEventSequenceOperations for managing operations related to an event sequence.
public class EventSequenceOperations : IEventSequenceOperations
- Inheritance
-
EventSequenceOperations
- Implements
- Inherited Members
Constructors
EventSequenceOperations(IEventSequence)
Represents an implementation of IEventSequenceOperations for managing operations related to an event sequence.
public EventSequenceOperations(IEventSequence eventSequence)
Parameters
eventSequenceIEventSequenceThe event sequence to operate on.
Properties
EventSequence
Gets the event sequence that these operations are associated with.
public IEventSequence EventSequence { get; }
Property Value
Methods
Clear()
Clears all operations that has been added.
public void Clear()
ForEventSourceId(EventSourceId, Action<EventSourceOperations>)
Configures operations for a specific event source identified by eventSourceId.
public 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.
public 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.
public 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.
public Task<AppendManyResult> Perform()
Returns
- Task<AppendManyResult>
An instance of AppendManyResult representing the result of the operation.
WithCausation(Causation)
Sets the causation for the operation.
public EventSequenceOperations WithCausation(Causation causation)
Parameters
causationCausationThe causation to set.
Returns
- EventSequenceOperations
The current instance of EventSequenceOperations.