C# 클래스 Gtd.Pcl.CoreDomain.AppServices.TrustedSystem.TrustedSystemAggregate

This is the behavioral 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 being held by the behavioral object (this Aggregate class). 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. When Events cause state changes to an Aggregate, the instant in-memory realization and reflection of this is in AggregateNameState, and the durable reflection of these changes are persisted back to the Event Stream by the ApplicationService. The AppService is what loads and calls the Aggregate and its behaviors, and acts as the atomic consistency boundary of an Aggregate & its contents.
파일 보기 프로젝트 열기: beingtheworst/btw-gtd 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
EventsCausingChanges List

공개 메소드들

메소드 설명
Apply ( ITrustedSystemEvent eventThatHappened ) : void

Make Aggregate realize the event happened by applying it to the state and adding to the list of uncommitted events

ArchiveAction ( ActionId actionId, ITimeProvider time ) : void
ChangeActionOutcome ( ActionId actionId, string outcome, ITimeProvider time ) : void
ChangeDescriptionOfStuff ( StuffId stuffId, string newDescriptionOfStuff, ITimeProvider time ) : void
ChangeProjectOutcome ( ProjectId projectId, string outcome, ITimeProvider time ) : void
ChangeProjectType ( ProjectId projectId, ProjectType type, ITimeProvider time ) : void
CompleteAction ( ActionId actionId, ITimeProvider provider ) : void
Create ( TrustedSystemId id ) : void
DeferActionUntil ( ActionId actionId, System.DateTime newStartDate ) : void
DefineAction ( RequestId requestId, ProjectId projectId, string outcome, ITimeProvider provider ) : void
DefineProject ( RequestId requestId, string name, ITimeProvider provider ) : void
DefineSingleActionProject ( RequestId requestId, StuffId stuffId, ITimeProvider provider ) : void
InitIfNeeded ( TrustedSystemId id ) : void
MoveActionsToProject ( IEnumerable actions, ProjectId targetProject, System.DateTime timeUtc ) : void
MoveStuffToProject ( IEnumerable stuffToMove, ProjectId projectId, ITimeProvider provider ) : void
ProvideDueDateForAction ( ActionId actionId, System.DateTime newDueDate ) : void
PutStuffInInbox ( RequestId requestId, string stuffDescription, ITimeProvider provider ) : void
TrashStuff ( StuffId stuffId, ITimeProvider provider ) : void
TrustedSystemAggregate ( TrustedSystemState aggStateBeforeChanges ) : System

비공개 메소드들

메소드 설명
GetActionOrThrow ( ActionId id ) : ActionInfo
GetProjectOrThrow ( ProjectId projectId ) : ProjectInfo
NewGuidIfEmpty ( RequestId requestId ) : System.Guid

메소드 상세

Apply() 공개 메소드

Make Aggregate realize the event happened by applying it to the state and adding to the list of uncommitted events
public Apply ( ITrustedSystemEvent eventThatHappened ) : void
eventThatHappened ITrustedSystemEvent
리턴 void

ArchiveAction() 공개 메소드

public ArchiveAction ( ActionId actionId, ITimeProvider time ) : void
actionId ActionId
time ITimeProvider
리턴 void

ChangeActionOutcome() 공개 메소드

public ChangeActionOutcome ( ActionId actionId, string outcome, ITimeProvider time ) : void
actionId ActionId
outcome string
time ITimeProvider
리턴 void

ChangeDescriptionOfStuff() 공개 메소드

public ChangeDescriptionOfStuff ( StuffId stuffId, string newDescriptionOfStuff, ITimeProvider time ) : void
stuffId StuffId
newDescriptionOfStuff string
time ITimeProvider
리턴 void

ChangeProjectOutcome() 공개 메소드

public ChangeProjectOutcome ( ProjectId projectId, string outcome, ITimeProvider time ) : void
projectId ProjectId
outcome string
time ITimeProvider
리턴 void

ChangeProjectType() 공개 메소드

public ChangeProjectType ( ProjectId projectId, ProjectType type, ITimeProvider time ) : void
projectId ProjectId
type ProjectType
time ITimeProvider
리턴 void

CompleteAction() 공개 메소드

public CompleteAction ( ActionId actionId, ITimeProvider provider ) : void
actionId ActionId
provider ITimeProvider
리턴 void

Create() 공개 메소드

public Create ( TrustedSystemId id ) : void
id TrustedSystemId
리턴 void

DeferActionUntil() 공개 메소드

public DeferActionUntil ( ActionId actionId, System.DateTime newStartDate ) : void
actionId ActionId
newStartDate System.DateTime
리턴 void

DefineAction() 공개 메소드

public DefineAction ( RequestId requestId, ProjectId projectId, string outcome, ITimeProvider provider ) : void
requestId RequestId
projectId ProjectId
outcome string
provider ITimeProvider
리턴 void

DefineProject() 공개 메소드

public DefineProject ( RequestId requestId, string name, ITimeProvider provider ) : void
requestId RequestId
name string
provider ITimeProvider
리턴 void

DefineSingleActionProject() 공개 메소드

public DefineSingleActionProject ( RequestId requestId, StuffId stuffId, ITimeProvider provider ) : void
requestId RequestId
stuffId StuffId
provider ITimeProvider
리턴 void

InitIfNeeded() 공개 메소드

public InitIfNeeded ( TrustedSystemId id ) : void
id TrustedSystemId
리턴 void

MoveActionsToProject() 공개 메소드

public MoveActionsToProject ( IEnumerable actions, ProjectId targetProject, System.DateTime timeUtc ) : void
actions IEnumerable
targetProject ProjectId
timeUtc System.DateTime
리턴 void

MoveStuffToProject() 공개 메소드

public MoveStuffToProject ( IEnumerable stuffToMove, ProjectId projectId, ITimeProvider provider ) : void
stuffToMove IEnumerable
projectId ProjectId
provider ITimeProvider
리턴 void

ProvideDueDateForAction() 공개 메소드

public ProvideDueDateForAction ( ActionId actionId, System.DateTime newDueDate ) : void
actionId ActionId
newDueDate System.DateTime
리턴 void

PutStuffInInbox() 공개 메소드

public PutStuffInInbox ( RequestId requestId, string stuffDescription, ITimeProvider provider ) : void
requestId RequestId
stuffDescription string
provider ITimeProvider
리턴 void

TrashStuff() 공개 메소드

public TrashStuff ( StuffId stuffId, ITimeProvider provider ) : void
stuffId StuffId
provider ITimeProvider
리턴 void

TrustedSystemAggregate() 공개 메소드

public TrustedSystemAggregate ( TrustedSystemState aggStateBeforeChanges ) : System
aggStateBeforeChanges TrustedSystemState
리턴 System

프로퍼티 상세

EventsCausingChanges 공개적으로 프로퍼티

public List EventsCausingChanges
리턴 List