예제 #1
0
        public GroupOfShifts _shiftsWorking;        // shift this person is actually working - Format is <string, list<Shift>> - first one is day of week, second one is list of shifts

        #region serialization functions

        public Employee(SerializationInfo info, StreamingContext ctxt)
        {
            this._username = (string)info.GetValue("username", typeof(string));
            this._name     = (string)info.GetValue("name", typeof(string));
            this._canWork  = (string)info.GetValue("canWork", typeof(string));

            this._assignedHours = (TimeSpan)info.GetValue("assignedHours", typeof(TimeSpan));

            this._availabilities = (GroupOfShifts)info.GetValue("availabilities", typeof(GroupOfShifts));
            this._shiftsWorking  = (GroupOfShifts)info.GetValue("shiftsWorking", typeof(GroupOfShifts));
        }
예제 #2
0
 /// <summary>
 /// Initializes datastructures to empty.
 /// </summary>
 private void InitializeDS()
 {
     // initialize the DS
     _availabilities = new GroupOfShifts();
     _shiftsWorking  = new GroupOfShifts();
 }