Table of Contents

Interface IAggregateRootMutation

Namespace
Cratis.Chronicle.Aggregates
Assembly
Cratis.Chronicle.dll

Defines the mutation related to an aggregate root.

public interface IAggregateRootMutation

Properties

EventSourceId

Gets the EventSourceId for the aggregate root.

EventSourceId EventSourceId { get; }

Property Value

EventSourceId

HasEvents

Gets a value indicating whether the mutation has events. This is an indication of whether or not the aggregate root has been mutated.

bool HasEvents { get; }

Property Value

bool

Mutator

Gets the mutator for the aggregate root.

IAggregateRootMutator Mutator { get; }

Property Value

IAggregateRootMutator

UncommittedEvents

Gets the uncommitted events for the aggregate root.

IImmutableList<object> UncommittedEvents { get; }

Property Value

IImmutableList<object>

Methods

Apply(object)

Apply a single event to the aggregate root mutation.

Task Apply(object @event)

Parameters

event object

Event to apply.

Returns

Task

Awaitable task.

Commit()

Commit the mutation.

Task<AggregateRootCommitResult> Commit()

Returns

Task<AggregateRootCommitResult>

Awaitable task.