Table of Contents

Class AggregateRootMutation

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

Represents an implementation of IAggregateRootMutation.

public class AggregateRootMutation : IAggregateRootMutation
Inheritance
AggregateRootMutation
Implements
Inherited Members

Constructors

AggregateRootMutation(IAggregateRootContext, IAggregateRootMutator, IEventSequence)

Represents an implementation of IAggregateRootMutation.

public AggregateRootMutation(IAggregateRootContext aggregateRootContext, IAggregateRootMutator mutator, IEventSequence eventSequence)

Parameters

aggregateRootContext IAggregateRootContext

The IAggregateRootContext for the aggregate root.

mutator IAggregateRootMutator

The IAggregateRootMutator for the aggregate root.

eventSequence IEventSequence

The IEventSequence for the aggregate root.

Fields

AggregateRootCausationTypeProperty

The causation aggregate root type property.

public const string AggregateRootCausationTypeProperty = "aggregateRootType"

Field Value

string

CausationEventSequenceIdProperty

The event sequence id causation property.

public const string CausationEventSequenceIdProperty = "eventSequenceId"

Field Value

string

CausationType

The causation type for the aggregate root.

public static readonly CausationType CausationType

Field Value

CausationType

Properties

EventSourceId

Gets the EventSourceId for the aggregate root.

public 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.

public bool HasEvents { get; }

Property Value

bool

Mutator

Gets the mutator for the aggregate root.

public IAggregateRootMutator Mutator { get; }

Property Value

IAggregateRootMutator

UncommittedEvents

Gets the uncommitted events for the aggregate root.

public IImmutableList<object> UncommittedEvents { get; }

Property Value

IImmutableList<object>

Methods

Apply(object)

Apply a single event to the aggregate root mutation.

public Task Apply(object @event)

Parameters

event object

Event to apply.

Returns

Task

Awaitable task.

Commit()

Commit the mutation.

public Task<AggregateRootCommitResult> Commit()

Returns

Task<AggregateRootCommitResult>

Awaitable task.