Closed jaduff closed 6 years ago
Probably LabEvent since it applies to all events. Can add things like IP address, authenticated user etc
Given this code:
public String Name {
get { return _name; }
set
{
if (_eventHandler == null)
{
return;
}
_name = value;
var @event = LabEvent.Create(Id,
++Version,
new RoomNameChangedEvent(_name)
);
_eventHandler(@event);
}
}
If I add the requirement to have an Event Author, I'll need to pass it to the setter above. How do you do that?
Or, if you don't do that, would I need to create a custom method:
Room.SetName(EventAuthor, RoomName) {}
?
Yeah, I'd look at using a method rather than a Property setter
Ok, will work on implementing EventAuthor
Events such as assigning a student to a room, and logging damage definitely need to record who entered the event. It could be argued that all events need an author. Should this be done in LabEvent, or in the EventBody section of particular events?