public ItemClientSnapshot(long version, ItemClientState state) : base(version) { this.State = state; }
public void When(NewItemCreated e) => this.state = ItemClientState.Created;
public void When(NewItemNeedsToBeAcceptedByTheServer e) => this.state = ItemClientState.WaitingServerAproval;
public void When(ItemCreationWasAcceptedByTheServer e) => this.state = ItemClientState.ItemAprovedByServer;
public ItemClient(Guid id, ISnapshot snapshot) : base(id, snapshot) { var state = (ItemClientSnapshot)snapshot; this.state = state.State; }