C# (CSharp) Gtd.Pcl.CoreDomain.AppServices.TrustedSystem Namespace

Сlasses

Name Description
ActionInfo
ProjectInfo
StuffInfo These "Info" objects maintain only invariants within themselves. Invariants between entities are maintained by the state. This helps to achieve more encapsulated code. This code is pleasant to work with and we know that there will be no side effects. Rules/biz logic can be enforced in this class and they will not be broken by outside or new parties/developers to the code. (ex: if Action is Archived then its current Completion state must never change)
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.
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.