Beispiel #1
0
 public bool Intersects(BookPeriod other)
 {
     return other.BeginAt <= BeginAt && BeginAt < other.EndAt ||
            other.BeginAt < EndAt && EndAt <= other.EndAt;
 }
Beispiel #2
0
 public void Execute()
 {
     var period = new BookPeriod(_request.BeginAt, _request.EndAt);
     _booking = new Booking(_request.PersonName, period);
     _register.TryBook(_request.RoomNumber, _booking);
 }
Beispiel #3
0
 public bool Equals(BookPeriod other)
 {
     return BeginAt.Equals(other.BeginAt) && EndAt.Equals(other.EndAt);
 }