Table of Contents

Class AggregateRoot

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

Represents an implementation of IAggregateRoot.

public class AggregateRoot : IAggregateRoot
Inheritance
AggregateRoot
Implements
Derived
Inherited Members
Extension Methods

Properties

IsNew

Gets a value indicating whether the aggregate root is new.

protected bool IsNew { get; }

Property Value

bool

Methods

Apply(object)

Apply a single event to the aggregate root.

public Task Apply(object @event)

Parameters

event object

Event to apply.

Returns

Task

Awaitable task.

Commit()

Commits the aggregate root.

public Task<AggregateRootCommitResult> Commit()

Returns

Task<AggregateRootCommitResult>

Awaitable task.

OnActivate()

Called when the aggregate root is ready to be activated.

protected virtual Task OnActivate()

Returns

Task

Awaitable task.