C# Class Gtd.Client.Models.ClientModel

This is part of the "Client Model" or "UI" Context This context is similar to a read model but it also has certain behaviors. You can perceive this "client model context" as an Aggregate that reacts to Events that are published by the to Domain Model. This "aggregate" maintains its own internal state that represents the state of a UI like a desktop application. When this state changes, this ClientModel publishes high-level UI-specific events like: StuffAddedToInbox, ProjectAdded, etc. These UI events are not "event sourced" (persisted events which are then replayed to get state), they are in-memory "dumb" UI events that do not need the level of detail that our persisted Event-Sourced Domain Model Events need. Our Domain Events are still the same granular ones that matter for when we are persisting the Domain Model state changes and using them to resolve the sync issues that come along with multi-user/device collaboration scenarios, but these in-memory "dumb" UI events do not need that level of detail to keep the UI up to date. Basically, we are modeling the things that will eventually be represented on a client's screen. Client Model is an underlying read model and notification sub-system for implementing a client application. Technically this Client Model context is reusable across various client/device types (desktop, tablet, web, phone, etc.), but the practicality of reusing it remains to be seen.
Afficher le fichier Open project: beingtheworst/btw-gtd Class Usage Examples

Méthodes publiques

Свойство Type Description
Id TrustedSystemId

Méthodes publiques

Méthode Description
ActionArchived ( ActionId id ) : void
ActionCompleted ( ActionId actionId ) : void
ActionDefined ( ProjectId projectId, ActionId actionId, string outcome ) : void
ActionMoved ( ActionId actionId, ProjectId oldProjectId, ProjectId newProjectId ) : void
ActionOutcomeChanged ( ActionId actionId, string outcome ) : void
ClientModel ( IMessageQueue queue, TrustedSystemId id ) : System
Create ( TrustedSystemId id ) : void
DeferredUtil ( ActionId actionId, System.DateTime deferUntil ) : void
DescriptionOfStuffChanged ( StuffId stuffId, string newDescriptionOfStuff ) : void
DueDateAssigned ( ActionId actionId, System.DateTime newDueDate ) : void
GetInbox ( ) : ImmutableInbox
GetProjectOrNull ( ProjectId projectId ) : ImmutableProject
GetTheNumberOfItemsOfStuffInInbox ( ) : int
ListProjects ( ) : IList
LoadingCompleted ( ) : void
ProjectDefined ( ProjectId projectId, string projectOutcome, ProjectType type ) : void
ProjectOutcomeChanged ( ProjectId projectId, string outcome ) : void
ProjectTypeChanged ( ProjectId projectId, ProjectType type ) : void
StuffArchived ( StuffId stuffId ) : void
StuffPutInInbox ( StuffId stuffId, string descriptionOfStuff, System.DateTime date ) : void
StuffTrashed ( StuffId stuffId ) : void
Verify ( TrustedSystemId id ) : void

Private Methods

Méthode Description
Publish ( Dumb e ) : void

Method Details

ActionArchived() public méthode

public ActionArchived ( ActionId id ) : void
id ActionId
Résultat void

ActionCompleted() public méthode

public ActionCompleted ( ActionId actionId ) : void
actionId ActionId
Résultat void

ActionDefined() public méthode

public ActionDefined ( ProjectId projectId, ActionId actionId, string outcome ) : void
projectId ProjectId
actionId ActionId
outcome string
Résultat void

ActionMoved() public méthode

public ActionMoved ( ActionId actionId, ProjectId oldProjectId, ProjectId newProjectId ) : void
actionId ActionId
oldProjectId ProjectId
newProjectId ProjectId
Résultat void

ActionOutcomeChanged() public méthode

public ActionOutcomeChanged ( ActionId actionId, string outcome ) : void
actionId ActionId
outcome string
Résultat void

ClientModel() public méthode

public ClientModel ( IMessageQueue queue, TrustedSystemId id ) : System
queue IMessageQueue
id TrustedSystemId
Résultat System

Create() public méthode

public Create ( TrustedSystemId id ) : void
id TrustedSystemId
Résultat void

DeferredUtil() public méthode

public DeferredUtil ( ActionId actionId, System.DateTime deferUntil ) : void
actionId ActionId
deferUntil System.DateTime
Résultat void

DescriptionOfStuffChanged() public méthode

public DescriptionOfStuffChanged ( StuffId stuffId, string newDescriptionOfStuff ) : void
stuffId StuffId
newDescriptionOfStuff string
Résultat void

DueDateAssigned() public méthode

public DueDateAssigned ( ActionId actionId, System.DateTime newDueDate ) : void
actionId ActionId
newDueDate System.DateTime
Résultat void

GetInbox() public méthode

public GetInbox ( ) : ImmutableInbox
Résultat ImmutableInbox

GetProjectOrNull() public méthode

public GetProjectOrNull ( ProjectId projectId ) : ImmutableProject
projectId ProjectId
Résultat ImmutableProject

GetTheNumberOfItemsOfStuffInInbox() public méthode

public GetTheNumberOfItemsOfStuffInInbox ( ) : int
Résultat int

ListProjects() public méthode

public ListProjects ( ) : IList
Résultat IList

LoadingCompleted() public méthode

public LoadingCompleted ( ) : void
Résultat void

ProjectDefined() public méthode

public ProjectDefined ( ProjectId projectId, string projectOutcome, ProjectType type ) : void
projectId ProjectId
projectOutcome string
type ProjectType
Résultat void

ProjectOutcomeChanged() public méthode

public ProjectOutcomeChanged ( ProjectId projectId, string outcome ) : void
projectId ProjectId
outcome string
Résultat void

ProjectTypeChanged() public méthode

public ProjectTypeChanged ( ProjectId projectId, ProjectType type ) : void
projectId ProjectId
type ProjectType
Résultat void

StuffArchived() public méthode

public StuffArchived ( StuffId stuffId ) : void
stuffId StuffId
Résultat void

StuffPutInInbox() public méthode

public StuffPutInInbox ( StuffId stuffId, string descriptionOfStuff, System.DateTime date ) : void
stuffId StuffId
descriptionOfStuff string
date System.DateTime
Résultat void

StuffTrashed() public méthode

public StuffTrashed ( StuffId stuffId ) : void
stuffId StuffId
Résultat void

Verify() public méthode

public Verify ( TrustedSystemId id ) : void
id TrustedSystemId
Résultat void

Property Details

Id public_oe property

public TrustedSystemId Id
Résultat TrustedSystemId