AngleSharp by AngleSharp

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

.NET API 960,512 bytes

 IRange

public interface IRange
The Range interface represents a fragment of a document that can contain nodes and parts of text nodes in a given document.

Gets the common ancestor node of the contained range.

int End { get; }

Gets the offset of the EndContainer in the document.

INode Head { get; }

Gets the node that starts the container.

bool IsCollapsed { get; }

Gets a value that indicates if the representation is collapsed.

int Start { get; }

Gets the offset of the StartContainer in the document.

INode Tail { get; }

Gets the node that ends the container.

void ClearContent()

Clears the contained nodes.

Creates a copy of this range.

void Collapse(bool toStart)

Collapses the range to a single level.

Compares the boundary points of the range.

RangePosition CompareTo(INode node, int offset)

Compares the node to the given offset and returns the relative position.

bool Contains(INode node, int offset)

Checks if the given node is within this range by using a offset.

Creates a document fragement of the contained nodes.

void Detach()

Detaches the range from the DOM tree.

void EndAfter(INode refNode)

Selects the end of the given range by using an exclusive reference node.

void EndBefore(INode refNode)

Selects the end of the given range by using an inclusive reference node.

void EndWith(INode refNode, int offset)

Selects the end of the given range by using the given reference node and a relative offset.

Clears the node representation and returns a document fragment with the originally contained nodes.

void Insert(INode node)

Inserts a node into the range.

bool Intersects(INode node)

Checks if the given node is intersected by this range.

void Select(INode refNode)

Selects the contained node.

void SelectContent(INode refNode)

Selects the contained nodes by taking a reference node as origin.

void StartAfter(INode refNode)

Selects the start of the given range by using an exclusive reference node.

void StartBefore(INode refNode)

Selects the start of the given range by using an inclusive reference node.

void StartWith(INode refNode, int offset)

Selects the start of the given range by using the given reference node and a relative offset.

void Surround(INode newParent)

Includes the given node with its siblings in the range.