Beispiel #1
0
 public OpenWhiteboardRoomType(pOpenWhiteboardRoomType c)
     : base(c.Time)
 {
     this.room = c.Room;
     if (null != c.Owner)
         this.owner = c.Owner;
     NameLists.whiteboardroomNames.New(c.Room, null);//Do not care if open references a previous name as scenario might legally reuse names or use conditionally.
     for (int i = 0; i < c.Members.Count; i++)
     {
         if (!UnitFacts.IsDM(c.Members[i])) throw new ApplicationException("Cannot add nonexistent decision maker " + c.Members[i] + " to whiteboard room " + c.Room);
     }
     this.members = c.Members; // Assignment after because parser creates new list each time
 }
Beispiel #2
0
        public override pOpenWhiteboardRoomType pGetOpenWhiteboardRoom()
        {
            pOpenWhiteboardRoomType returnValue;
            string room = "Unknown whiteboard room";
            int time;
            List<string> memberList;
            try
            {
                reader.Read();
                room = pGetString();
                time = pGetInt();
                returnValue = new pOpenWhiteboardRoomType(room, time);
                if ("Owner" == reader.Name)
                {
                    returnValue.Owner = pGetString();
                }
                while ("Members" == reader.Name)
                {
                    memberList = pGetStringList(commaRegex);
                    returnValue.Add(memberList);
                }
                reader.ReadEndElement();
                return returnValue;

            }
            catch (SystemException e)
            {
                throw new ApplicationException("Could not read OpenWhiteboardRoom for room " + room, e);
            }
        }