Table of Contents

Class Change

Namespace
Shift.Common.Timeline.Changes
Assembly
Shift.Common.dll

Defines the base class for all events.

public class Change : IChange
Inheritance
Change
Implements
Derived
Inherited Members
Extension Methods

Remarks

An event represents something that has taken place in the domain. It is always named with a past-participle verb, such as Order Confirmed. Since an event represents something in the past, it can be considered a statement of fact, which can be used to make decisions in other parts of the system.Events are immutable because they represent domain actions that occurred in the past, and the past cannot be altered.

Constructors

Change()

Constructs a new instance. By default the event time is now.

public Change()

Properties

AggregateIdentifier

Identifies the aggregate for which the event was raised.

public Guid AggregateIdentifier { get; set; }

Property Value

Guid

AggregateState

An event may (optionally) include the current state for the aggregate that raised it.

public AggregateState AggregateState { get; set; }

Property Value

AggregateState

Remarks

Event subscribers must never assume this property is used, therefore it may be null some (or all!) of the time. Each individual command subscriber decides for itself whether or not to set this property before it publishes new events. It is strictly for convenience, when you have event subscribers, process managers, and/or query projections that need to work with the aggregate state "as at" the time of a published event.

AggregateVersion

Version number of the aggregate for which the event was raised.

public int AggregateVersion { get; set; }

Property Value

int

ChangeClass

Fully-qualified assembly name for the class that implements the event.

public string ChangeClass { get; set; }

Property Value

string

ChangeData

Serialized data for the event.

public string ChangeData { get; set; }

Property Value

string

ChangeTime

Date and time the event was raised.

public DateTimeOffset ChangeTime { get; set; }

Property Value

DateTimeOffset

ChangeTransactionId

public Guid? ChangeTransactionId { get; set; }

Property Value

Guid?

ChangeType

Abbreviated class name.

public string ChangeType { get; set; }

Property Value

string

OriginOrganization

Identifies the organization for the session in which the event was raised.

public Guid OriginOrganization { get; set; }

Property Value

Guid

OriginUser

Identifies the user for the session in which the event was raised.

public Guid OriginUser { get; set; }

Property Value

Guid

Methods

Identify(Guid, Guid)

public void Identify(Guid organization, Guid user)

Parameters

organization Guid
user Guid