C# Класс Gtd.Pcl.CoreDomain.AppServices.TrustedSystem.TrustedSystemState

This is the current in-memory "state" half of our A+ES implementation. We split the Aggregates and Event Sourcing (A+ES) implementation into two distinct classes: - one for state (AggregateNameState), - and one for behavior (AggregateName), with the state object (this class) being held by the behavioral object (the Aggregate). The two objects collaborate exclusively through the Aggregate's Apply() method. This ensures that an Aggregate's state is changed only by means of Events. This AggregateState class typically exists for very short periods at a time (likely milliseconds) when the Aggregate is loaded from Event Stream history and the Events are replayed through this state class to derive current Aggregate state. This current in-memory state ensures that Aggregate behaviors (methods) with multiple steps, have up-to-date state to operate on for each subsequent step. When changes are made to an Aggregate, and the results are persisted back to the Event Stream by the ApplicationService, the system drops all references to this state class instance and it is garbage collected.
Наследование: ITrustedSystemState
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Actions ActionInfo>.IDictionary
Inbox HashSet
Projects ProjectInfo>.IDictionary
StuffInInbox StuffInfo>.IDictionary

Открытые методы

Метод Описание
BuildStateFromEventHistory ( IEnumerable events ) : TrustedSystemState
MakeStateRealize ( ITrustedSystemEvent thisEventTypeHappened ) : void
TrustedSystemState ( ) : System
When ( ActionArchived e ) : void
When ( ActionAssignedToProject e ) : void
When ( ActionCompleted e ) : void
When ( ActionDeferDateShifted e ) : void
When ( ActionDeferredUntil e ) : void
When ( ActionDefined e ) : void
When ( ActionDueDateMoved e ) : void
When ( ActionIsNoLongerDeferred e ) : void
When ( ActionMovedToProject e ) : void
When ( ActionOutcomeChanged e ) : void
When ( ActionRemovedFromProject e ) : void
When ( DueDateAssignedToAction e ) : void
When ( DueDateRemovedFromAction e ) : void
When ( ProjectDefined e ) : void
When ( ProjectOutcomeChanged e ) : void
When ( ProjectTypeChanged e ) : void
When ( StuffArchived e ) : void
When ( StuffDescriptionChanged e ) : void
When ( StuffPutInInbox e ) : void
When ( StuffTrashed e ) : void
When ( TrustedSystemCreated e ) : void

Описание методов

BuildStateFromEventHistory() публичный статический Метод

public static BuildStateFromEventHistory ( IEnumerable events ) : TrustedSystemState
events IEnumerable
Результат TrustedSystemState

MakeStateRealize() публичный Метод

public MakeStateRealize ( ITrustedSystemEvent thisEventTypeHappened ) : void
thisEventTypeHappened ITrustedSystemEvent
Результат void

TrustedSystemState() публичный Метод

public TrustedSystemState ( ) : System
Результат System

When() публичный Метод

public When ( ActionArchived e ) : void
e ActionArchived
Результат void

When() публичный Метод

public When ( ActionAssignedToProject e ) : void
e ActionAssignedToProject
Результат void

When() публичный Метод

public When ( ActionCompleted e ) : void
e ActionCompleted
Результат void

When() публичный Метод

public When ( ActionDeferDateShifted e ) : void
e ActionDeferDateShifted
Результат void

When() публичный Метод

public When ( ActionDeferredUntil e ) : void
e ActionDeferredUntil
Результат void

When() публичный Метод

public When ( ActionDefined e ) : void
e ActionDefined
Результат void

When() публичный Метод

public When ( ActionDueDateMoved e ) : void
e ActionDueDateMoved
Результат void

When() публичный Метод

public When ( ActionIsNoLongerDeferred e ) : void
e ActionIsNoLongerDeferred
Результат void

When() публичный Метод

public When ( ActionMovedToProject e ) : void
e ActionMovedToProject
Результат void

When() публичный Метод

public When ( ActionOutcomeChanged e ) : void
e ActionOutcomeChanged
Результат void

When() публичный Метод

public When ( ActionRemovedFromProject e ) : void
e ActionRemovedFromProject
Результат void

When() публичный Метод

public When ( DueDateAssignedToAction e ) : void
e DueDateAssignedToAction
Результат void

When() публичный Метод

public When ( DueDateRemovedFromAction e ) : void
e DueDateRemovedFromAction
Результат void

When() публичный Метод

public When ( ProjectDefined e ) : void
e ProjectDefined
Результат void

When() публичный Метод

public When ( ProjectOutcomeChanged e ) : void
e ProjectOutcomeChanged
Результат void

When() публичный Метод

public When ( ProjectTypeChanged e ) : void
e ProjectTypeChanged
Результат void

When() публичный Метод

public When ( StuffArchived e ) : void
e StuffArchived
Результат void

When() публичный Метод

public When ( StuffDescriptionChanged e ) : void
e StuffDescriptionChanged
Результат void

When() публичный Метод

public When ( StuffPutInInbox e ) : void
e StuffPutInInbox
Результат void

When() публичный Метод

public When ( StuffTrashed e ) : void
e StuffTrashed
Результат void

When() публичный Метод

public When ( TrustedSystemCreated e ) : void
e TrustedSystemCreated
Результат void

Описание свойств

Actions публичное свойство

public IDictionary Actions
Результат ActionInfo>.IDictionary

Inbox публичное свойство

public HashSet Inbox
Результат HashSet

Projects публичное свойство

public IDictionary Projects
Результат ProjectInfo>.IDictionary

StuffInInbox публичное свойство

public IDictionary StuffInInbox
Результат StuffInfo>.IDictionary