Table of Contents

Class EventSourceOperations

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

Represents an implementation of IEventSourceOperations for managing operations related to a specific event source.

public class EventSourceOperations : IEventSourceOperations
Inheritance
EventSourceOperations
Implements
Inherited Members

Properties

ConcurrencyScope

Gets the concurrency scope for the operations.

public ConcurrencyScope ConcurrencyScope { get; }

Property Value

ConcurrencyScope

Operations

Gets the operations associated with the event source.

public IEnumerable<IEventSequenceOperation> Operations { get; }

Property Value

IEnumerable<IEventSequenceOperation>

Methods

Append(object, Causation?, EventStreamType?, EventStreamId?, EventSourceType?)

Appends an event to the operation.

public EventSourceOperations Append(object @event, Causation? causation = null, EventStreamType? eventStreamType = null, EventStreamId? eventStreamId = null, EventSourceType? eventSourceType = null)

Parameters

event object

The event to append.

causation Causation

Optional causation for the event.

eventStreamType EventStreamType

Optional The type of event stream.

eventStreamId EventStreamId

Optional The identifier for the event stream.

eventSourceType EventSourceType

Optional The type of event source.

Returns

EventSourceOperations

The current instance of EventSourceOperations.

GetAppendedEvents()

Gets the events that have been appended in the operation builders.

public IEnumerable<object> GetAppendedEvents()

Returns

IEnumerable<object>

Collection of events.

GetOperationsOfType<T>()

Gets the operations of a specific type.

public IEnumerable<T> GetOperationsOfType<T>() where T : IEventSequenceOperation

Returns

IEnumerable<T>

Collection of operations of the specified type.

Type Parameters

T

The type of operations to retrieve.

WithConcurrencyScope(ConcurrencyScope)

Configures the concurrency scope for the operations with a specific scope.

public EventSourceOperations WithConcurrencyScope(ConcurrencyScope concurrencyScope)

Parameters

concurrencyScope ConcurrencyScope

The concurrency scope to set.

Returns

EventSourceOperations

The current instance of EventSourceOperations.

WithConcurrencyScope(Action<ConcurrencyScopeBuilder>)

Configures the concurrency scope for the operations.

public EventSourceOperations WithConcurrencyScope(Action<ConcurrencyScopeBuilder> configure)

Parameters

configure Action<ConcurrencyScopeBuilder>

Action to configure the concurrency scope.

Returns

EventSourceOperations

The current instance of EventSourceOperations.