/// <summary> /// Initializes a new instance of the <see cref="LineReader"/> class. /// </summary> /// <exception cref="ArgumentNullException"></exception> /// <exception cref="ArgumentOutOfRangeException">bufferSize cannot be <= 0</exception> public LineReader(string text) { if (text is null) { ThrowHelper.ArgumentNullException_text(); } _text = text; SourcePosition = 0; }
/// <summary> /// Initializes a new instance of the <see cref="StringLineGroup"/> class. /// </summary> /// <param name="text">The text.</param> /// <exception cref="ArgumentNullException"></exception> public StringLineGroup(string text) { if (text == null) { ThrowHelper.ArgumentNullException_text(); } Lines = new StringLine[1]; Count = 0; Add(new StringSlice(text)); }
/// <summary> /// Initializes a new instance of the <see cref="StringSlice"/> struct. /// </summary> /// <param name="text">The text.</param> /// <param name="start">The start.</param> /// <param name="end">The end.</param> /// <exception cref="ArgumentNullException"></exception> public StringSlice(string text, int start, int end) { if (text is null) { ThrowHelper.ArgumentNullException_text(); } Text = text; Start = start; End = end; }