MrKWatkins.Ast Help

SourceFilePosition<TSelf, TFile> Class

Definition

A SourcePosition in a source code file.

public abstract class SourceFilePosition<TSelf, TFile> : SourcePosition<TSelf>, IEquatable<SourcePosition>, IEqualityOperators<SourcePosition, SourcePosition, Boolean> where TSelf : SourceFilePosition<TSelf, TFile> where TFile : SourceFile

Type Parameters

Name

Description

TSelf

TFile

Constructors

Name

Description

SourceFilePosition(TFile, Int32, Int32)

Initialises a new instance of the SourceFilePosition<TSelf, TFile> class.

Properties

Name

Description

EndIndex

The exclusive end index of the position in the source file.

File

The SourceFile.

Length

The length of the position in the source file.

StartIndex

The inclusive start index of the position in the source file.

Methods

Name

Description

Combine(TSelf)

CreateCombination(TSelf)

Creates a combination of this SourceFilePosition<TSelf, TFile> and another. Used to create a combination for Combine(TSelf).

Equals(SourcePosition)

GetHashCode()

Overlaps(SourceFilePosition<TSelf, TFile>)

Returns true if two positions for the same file overlap. Zero length positions will overlap only if they are inside the other position. If they are at the start or end index of the other position they will not overlap. Two zero length positions never overlap.

ToString()

Last modified: 22 November 2024