Skip to content

TextFilePosition Class ​

Definition ​

A SourcePosition in a text source code file.

c#
public sealed class TextFilePosition : SourceFilePosition<TextFilePosition, TextFile>, IEquatable<SourcePosition>, IEqualityOperators<SourcePosition, SourcePosition, Boolean>, ITextSourcePosition

View source

Properties ​

NameDescription
StartColumnIndexZero based index of the start column of the position in the text file.
StartColumnNumberNumber, that is, 1 based index, of the start column of the position in the text file.
StartLineThe start line of the text source.
StartLineIndexZero based index of the start line of the position in the text file.
StartLineNumberNumber, that is, 1 based index, of the start line of the position in the text file.
TextThe text source.

Methods ​

NameDescription
CreateCombination(TextFilePosition)Creates a combination of this SourceFilePosition<TSelf, TFile> and another. Used to create a combination for Combine(TSelf).
CreateZeroWidthPrefix()Create a new TextFilePosition with zero width at the start of this TextFilePosition.
ToString()Returns a string that represents the current object.
WriteSourceForMessage(StringBuilder)Writes the source for the purposes of displaying a Message.

Operators ​

NameDescription
Addition(TextFilePosition, TextFilePosition)Combines two TextFilePositions to give a new SourcePosition that includes both x and y along with any source in-between the two.