C# Class 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.
Inheritance: ITrustedSystemState
Afficher le fichier Open project: beingtheworst/btw-gtd Class Usage Examples

Méthodes publiques

Свойство Type Description
Actions ActionInfo>.IDictionary
Inbox HashSet
Projects ProjectInfo>.IDictionary
StuffInInbox StuffInfo>.IDictionary

Méthodes publiques

Méthode Description
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

Method Details

BuildStateFromEventHistory() public static méthode

public static BuildStateFromEventHistory ( IEnumerable events ) : TrustedSystemState
events IEnumerable
Résultat TrustedSystemState

MakeStateRealize() public méthode

public MakeStateRealize ( ITrustedSystemEvent thisEventTypeHappened ) : void
thisEventTypeHappened ITrustedSystemEvent
Résultat void

TrustedSystemState() public méthode

public TrustedSystemState ( ) : System
Résultat System

When() public méthode

public When ( ActionArchived e ) : void
e ActionArchived
Résultat void

When() public méthode

public When ( ActionAssignedToProject e ) : void
e ActionAssignedToProject
Résultat void

When() public méthode

public When ( ActionCompleted e ) : void
e ActionCompleted
Résultat void

When() public méthode

public When ( ActionDeferDateShifted e ) : void
e ActionDeferDateShifted
Résultat void

When() public méthode

public When ( ActionDeferredUntil e ) : void
e ActionDeferredUntil
Résultat void

When() public méthode

public When ( ActionDefined e ) : void
e ActionDefined
Résultat void

When() public méthode

public When ( ActionDueDateMoved e ) : void
e ActionDueDateMoved
Résultat void

When() public méthode

public When ( ActionIsNoLongerDeferred e ) : void
e ActionIsNoLongerDeferred
Résultat void

When() public méthode

public When ( ActionMovedToProject e ) : void
e ActionMovedToProject
Résultat void

When() public méthode

public When ( ActionOutcomeChanged e ) : void
e ActionOutcomeChanged
Résultat void

When() public méthode

public When ( ActionRemovedFromProject e ) : void
e ActionRemovedFromProject
Résultat void

When() public méthode

public When ( DueDateAssignedToAction e ) : void
e DueDateAssignedToAction
Résultat void

When() public méthode

public When ( DueDateRemovedFromAction e ) : void
e DueDateRemovedFromAction
Résultat void

When() public méthode

public When ( ProjectDefined e ) : void
e ProjectDefined
Résultat void

When() public méthode

public When ( ProjectOutcomeChanged e ) : void
e ProjectOutcomeChanged
Résultat void

When() public méthode

public When ( ProjectTypeChanged e ) : void
e ProjectTypeChanged
Résultat void

When() public méthode

public When ( StuffArchived e ) : void
e StuffArchived
Résultat void

When() public méthode

public When ( StuffDescriptionChanged e ) : void
e StuffDescriptionChanged
Résultat void

When() public méthode

public When ( StuffPutInInbox e ) : void
e StuffPutInInbox
Résultat void

When() public méthode

public When ( StuffTrashed e ) : void
e StuffTrashed
Résultat void

When() public méthode

public When ( TrustedSystemCreated e ) : void
e TrustedSystemCreated
Résultat void

Property Details

Actions public_oe property

public IDictionary Actions
Résultat ActionInfo>.IDictionary

Inbox public_oe property

public HashSet Inbox
Résultat HashSet

Projects public_oe property

public IDictionary Projects
Résultat ProjectInfo>.IDictionary

StuffInInbox public_oe property

public IDictionary StuffInInbox
Résultat StuffInfo>.IDictionary