/// <summary> /// Creates a new section which spawns from the lowest <see cref="Index" /> /// of the given two sections to the greatest <see cref="LastIndex" />. /// </summary> /// <param name="lhs"></param> /// <param name="rhs"></param> /// <returns></returns> public static LogSourceSection MinimumBoundingLine(LogSourceSection lhs, LogSourceSection rhs) { LogLineIndex minIndex = LogLineIndex.Min(lhs.Index, rhs.Index); LogLineIndex maxIndex = LogLineIndex.Max(lhs.Index + lhs.Count, rhs.Index + rhs.Count); int count = maxIndex - minIndex; return(new LogSourceSection(minIndex, count)); }