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
파일 보기 프로젝트 열기: beingtheworst/btw-gtd 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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