internal SourceTextLine(StringSourceText sourceText, int line, int lineStart, int lineEnd) { if (sourceText == null) { throw new ArgumentNullException(nameof(sourceText)); } if (TextExtent.FromBounds(lineStart, lineEnd).IsMissing) { throw new ArgumentOutOfRangeException(nameof(lineEnd)); } if (line < 0) { throw new ArgumentOutOfRangeException(nameof(line)); } if (line > lineEnd) { throw new ArgumentOutOfRangeException(nameof(line)); } if (lineEnd > sourceText.Length) { throw new ArgumentOutOfRangeException(nameof(lineEnd)); } SourceText = sourceText; Line = line; Start = lineStart; EndIncludingLineBreak = lineEnd; }
public StringTextLineList(StringSourceText sourceText) { _sourceText = sourceText; }