예제 #1
0
        public bool Intersects(FoundationDateTimeInterval other)
        {
            var start      = ElementPair.Max(Start, other.Start);
            var end        = ElementPair.Min(End, other.End);
            var intersects = start < end;

            return(intersects);
        }
예제 #2
0
        public bool Intersects(SmallDateInterval other)
        {
            var start      = ElementPair.Max(Start, other.Start);
            var end        = ElementPair.Min(End, other.End);
            var intersects = start <= end;

            return(intersects);
        }
예제 #3
0
        public FoundationDateTimeInterval?Intersect(FoundationDateTimeInterval other)
        {
            var start      = ElementPair.Max(Start, other.Start);
            var end        = ElementPair.Min(End, other.End);
            var intersects = start < end;

            return(intersects
                ? new FoundationDateTimeInterval(start, end)
                : (FoundationDateTimeInterval?)null);
        }
예제 #4
0
        public SmallDateInterval?Intersect(SmallDateInterval other)
        {
            var start      = ElementPair.Max(Start, other.Start);
            var end        = ElementPair.Min(End, other.End);
            var intersects = start <= end;

            return(intersects
                ? new SmallDateInterval(start, end)
                : (SmallDateInterval?)null);
        }