public override bool Equals(object obj) { if (obj == null || !(GetType() == obj.GetType())) { return(false); } ShiftStartEvent e = (ShiftStartEvent)obj; return(_eventDate.Equals(e._eventDate) && _id == e._id); }
public void OnEvent(ShiftStartEvent e) { _onDuty = e.ID; Guard g; if (!_roster.ContainsKey(_onDuty)) { g = new Guard(_onDuty); _roster.Add(_onDuty, g); } else { g = _roster[_onDuty]; } }