Exemple #1
0
		public void SetUp()
		{
			_availableNow = new TimeInterval(DateTime.Now, DateTime.Now.AddHours(1));
			_availableVerySoon = new TimeInterval(DateTime.Now.AddMinutes(3), DateTime.Now.AddHours(1));
			_availableLater = new TimeInterval(DateTime.Now.AddHours(2), DateTime.Now.AddHours(4));
			_availableForShortPeriod = new TimeInterval(DateTime.Now, DateTime.Now.AddMinutes(13));
		}
Exemple #2
0
		public static TimeInterval CollapseCalendar(IEnumerable<TimeInterval> events)
		{
			var interval = new TimeInterval(DateTime.Now, DateTime.Now.AddHours(10));
			foreach (var ev in events)
			{
				interval = interval - ev;
				Debug.WriteLine($"Event {ev.Start}-{ev.End}");
			}
			Debug.WriteLine($"Narrowed down to {interval.Start}:{interval.End}");
			return interval;
		}
		public RoomAvailabilityInfo(TimeInterval availability, RoomInfo room)
		{
			Availability = availability;
			Room = room;
		}