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.
显示文件 Open project: beingtheworst/btw-gtd Class Usage Examples

Public Properties

Property Type Description
Id TrustedSystemId

Public Methods

Method 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

Method Description
Publish ( Dumb e ) : void

Method Details

ActionArchived() public method

public ActionArchived ( ActionId id ) : void
id ActionId
return void

ActionCompleted() public method

public ActionCompleted ( ActionId actionId ) : void
actionId ActionId
return void

ActionDefined() public method

public ActionDefined ( ProjectId projectId, ActionId actionId, string outcome ) : void
projectId ProjectId
actionId ActionId
outcome string
return void

ActionMoved() public method

public ActionMoved ( ActionId actionId, ProjectId oldProjectId, ProjectId newProjectId ) : void
actionId ActionId
oldProjectId ProjectId
newProjectId ProjectId
return void

ActionOutcomeChanged() public method

public ActionOutcomeChanged ( ActionId actionId, string outcome ) : void
actionId ActionId
outcome string
return void

ClientModel() public method

public ClientModel ( IMessageQueue queue, TrustedSystemId id ) : System
queue IMessageQueue
id TrustedSystemId
return System

Create() public method

public Create ( TrustedSystemId id ) : void
id TrustedSystemId
return void

DeferredUtil() public method

public DeferredUtil ( ActionId actionId, System.DateTime deferUntil ) : void
actionId ActionId
deferUntil System.DateTime
return void

DescriptionOfStuffChanged() public method

public DescriptionOfStuffChanged ( StuffId stuffId, string newDescriptionOfStuff ) : void
stuffId StuffId
newDescriptionOfStuff string
return void

DueDateAssigned() public method

public DueDateAssigned ( ActionId actionId, System.DateTime newDueDate ) : void
actionId ActionId
newDueDate System.DateTime
return void

GetInbox() public method

public GetInbox ( ) : ImmutableInbox
return ImmutableInbox

GetProjectOrNull() public method

public GetProjectOrNull ( ProjectId projectId ) : ImmutableProject
projectId ProjectId
return ImmutableProject

GetTheNumberOfItemsOfStuffInInbox() public method

public GetTheNumberOfItemsOfStuffInInbox ( ) : int
return int

ListProjects() public method

public ListProjects ( ) : IList
return IList

LoadingCompleted() public method

public LoadingCompleted ( ) : void
return void

ProjectDefined() public method

public ProjectDefined ( ProjectId projectId, string projectOutcome, ProjectType type ) : void
projectId ProjectId
projectOutcome string
type ProjectType
return void

ProjectOutcomeChanged() public method

public ProjectOutcomeChanged ( ProjectId projectId, string outcome ) : void
projectId ProjectId
outcome string
return void

ProjectTypeChanged() public method

public ProjectTypeChanged ( ProjectId projectId, ProjectType type ) : void
projectId ProjectId
type ProjectType
return void

StuffArchived() public method

public StuffArchived ( StuffId stuffId ) : void
stuffId StuffId
return void

StuffPutInInbox() public method

public StuffPutInInbox ( StuffId stuffId, string descriptionOfStuff, System.DateTime date ) : void
stuffId StuffId
descriptionOfStuff string
date System.DateTime
return void

StuffTrashed() public method

public StuffTrashed ( StuffId stuffId ) : void
stuffId StuffId
return void

Verify() public method

public Verify ( TrustedSystemId id ) : void
id TrustedSystemId
return void

Property Details

Id public_oe property

public TrustedSystemId Id
return TrustedSystemId