示例#1
0
        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);
        }
示例#2
0
        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];
            }
        }