AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="0.9.8" />

 TextView

public class TextView
Represents a view on a particular source code.
using System; namespace AngleSharp { public class TextView { private readonly TextRange _range; private readonly TextSource _source; public TextRange Range => _range; public string Text { get { TextRange range = _range; TextPosition textPosition = range.Start; int num = Math.Max(textPosition.Position - 1, 0); range = _range; textPosition = range.End; int num2 = textPosition.Position + 1; range = _range; textPosition = range.Start; int num3 = num2 - textPosition.Position; string text = _source.Text; if (num + num3 > text.Length) num3 = text.Length - num; return text.Substring(num, num3); } } internal TextView(TextRange range, TextSource source) { _range = range; _source = source; } } }