/// <summary> /// Odstraneni meeting roomu, spise pro budouci upravy /// </summary> /// <param name="room"></param> public void RemoveMeetingRoom(MeetingRoom room) { if (RoomExists(room)) { MeetingRooms.Remove(room); } }
/// <summary> /// Obecne pridani instance meeting roomu /// </summary> /// <param name="room"></param> public void AddMeetingRoom(MeetingRoom room) { if (RoomExists(room)) { throw new InvalidOperationException(String.Format("Mistnost {0} j*z existuje", room.Name)); } MeetingRooms.Add(room); }
/// <summary> /// Pomocna metoda, vraci list stringu pro jednotlive dny, aby bylo mozne dat do JSONu meetingy pod dny /// </summary> /// <param name="mr"></param> /// <returns></returns> private List <string> IndividualDates(MeetingRoom mr) { List <string> res = new List <string>(); foreach (Meeting m in mr.Meetings) { if (!res.Contains(m.Date)) { res.Add(m.Date); } } return(res); }
/// <summary> /// Kontrola, zda je meeting room v meeting center /// </summary> /// <param name="room"></param> /// <returns></returns> private bool RoomExists(MeetingRoom room) { return(MeetingRooms.Contains(room)); }