示例#1
0
文件: Room.cs 项目: ajzeffer/RooMate
 public static Room Create(IGraphSchedule schedule)
 {
     // build up the room with validation and addtl fields
     return(new Room
     {
         RoomName = GetRoomName(schedule.scheduleId),
         RoomId = schedule.scheduleId,
         Schedule = RoomSchedule.Create(schedule)
     });
 }
示例#2
0
        public static IRoomSchedule Create(IGraphSchedule sched)
        {
            var roomSched = new RoomSchedule
            {
                ScheduleItems = new List <IRoomScheduleItem>()
            };

            roomSched.ScheduleItems = sched.scheduleItems.Select(RoomScheduleItem.Create).ToList();
            return(roomSched);
        }