private void EventBroker_Commands(object sender, DAPCommand e) { var cAC = e as ChangeAgeCommand; if (cAC != null && cAC.Target == this) { //eventBroker.Events.Add(new AgeChangedEvent<Person>(this, _age, cAC.Age)); _age = cAC.Age; } }
//To undo last transaction public void ExecuteCommand(DAPCommand command) { DAPEventInfo oEventInfo = new DAPEventInfo(); oEventInfo.Id = EventDetails.EventInfos.Count + 1; oEventInfo.Command = command; oEventInfo.CreatedBy = "Guest"; oEventInfo.OldTarget = command.Target; Commands?.Invoke(this, command); EventDetails.EventInfos.Add(new DAPEventInfo() { Id = EventDetails.EventInfos.Count + 1, Command = command, CreatedBy = "Guest" }); EventDetails.Save(); }
public virtual void EventBroker_Commands(object sender, DAPCommand e) { execute_cq("c", e); }