Class ConcurrencyScopeBuilder
- Namespace
- Cratis.Chronicle.EventSequences.Concurrency
- Assembly
- Cratis.Chronicle.dll
Builder for creating a ConcurrencyScope for an event sequence append operation.
public class ConcurrencyScopeBuilder
- Inheritance
-
ConcurrencyScopeBuilder
- Inherited Members
Methods
Build()
Builds the ConcurrencyScope with the configured properties.
public ConcurrencyScope Build()
Returns
- ConcurrencyScope
A new instance of ConcurrencyScope.
WithEventSourceId(EventSourceId)
Sets the EventSourceId for the concurrency scope.
public ConcurrencyScopeBuilder WithEventSourceId(EventSourceId eventSourceId)
Parameters
eventSourceIdEventSourceIdEventSourceId to scope to.
Returns
- ConcurrencyScopeBuilder
ConcurrencyScopeBuilder for continuation.
WithEventSourceType(EventSourceType)
Sets the EventSourceType for the concurrency scope.
public ConcurrencyScopeBuilder WithEventSourceType(EventSourceType eventSourceType)
Parameters
eventSourceTypeEventSourceTypeEventSourceType to scope to.
Returns
- ConcurrencyScopeBuilder
ConcurrencyScopeBuilder for continuation.
WithEventStreamId(EventStreamId)
Sets the EventStreamId for the concurrency scope.
public ConcurrencyScopeBuilder WithEventStreamId(EventStreamId eventStreamId)
Parameters
eventStreamIdEventStreamIdEventStreamId to scope to.
Returns
- ConcurrencyScopeBuilder
ConcurrencyScopeBuilder for continuation.
WithEventStreamType(EventStreamType)
Sets the EventStreamType for the concurrency scope.
public ConcurrencyScopeBuilder WithEventStreamType(EventStreamType eventStreamType)
Parameters
eventStreamTypeEventStreamTypeEventStreamType to scope to.
Returns
- ConcurrencyScopeBuilder
ConcurrencyScopeBuilder for continuation.
WithEventType(EventType)
Adds a EventType for the concurrency scope.
public ConcurrencyScopeBuilder WithEventType(EventType eventType)
Parameters
Returns
- ConcurrencyScopeBuilder
ConcurrencyScopeBuilder for continuation.
WithEventType(Type)
Adds a EventType for the concurrency scope.
public ConcurrencyScopeBuilder WithEventType(Type type)
Parameters
typeTypeType of the event to scope to.
Returns
- ConcurrencyScopeBuilder
ConcurrencyScopeBuilder for continuation.
WithEventType<T>()
Adds a EventType for the concurrency scope.
public ConcurrencyScopeBuilder WithEventType<T>()
Returns
- ConcurrencyScopeBuilder
ConcurrencyScopeBuilder for continuation.
Type Parameters
TType of the event to scope to.
WithEventTypes(IEnumerable<EventType>)
Adds a collection of EventTypes for the concurrency scope.
public ConcurrencyScopeBuilder WithEventTypes(IEnumerable<EventType> eventTypes)
Parameters
eventTypesIEnumerable<EventType>Collection of EventTypes to scope to.
Returns
- ConcurrencyScopeBuilder
ConcurrencyScopeBuilder for continuation.
WithSequenceNumber(EventSequenceNumber)
Sets the EventSequenceNumber for the concurrency scope.
public ConcurrencyScopeBuilder WithSequenceNumber(EventSequenceNumber sequenceNumber)
Parameters
sequenceNumberEventSequenceNumberEventSequenceNumber to scope to.
Returns
- ConcurrencyScopeBuilder
ConcurrencyScopeBuilder for continuation.