Example #1
0
        public ReferenceSegment(ReferencePoint start, ReferencePoint end)
        {
            if (start > end)
            {
                throw new ArgumentException("Start chapter is greater than the end chapter");
            }

            if (start.Chapter == end.Chapter && start.Verse > end.Verse)
            {
                throw new ArgumentException("Start verse is greater than the end verse");
            }

            if (start.Verse == 0 ^ end.Verse == 0)
            {
                throw new ArgumentException("One of the start and end verses is 0 and the other is not");
            }

            Start = start;
            End   = end;
        }
Example #2
0
 public ReferenceSegment(ReferencePoint point, int verseEnd) : this(point, new ReferencePoint(point.Chapter, verseEnd))
 {
 }
Example #3
0
 public ReferenceSegment(ReferencePoint point) : this(point, point)
 {
 }