Skip to content

TextFilePosition Class

Definition

A SourcePosition in a text source code file.

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

View source

Properties

Name Description
StartColumnIndex Zero based index of the start column of the position in the text file.
StartColumnNumber Number, i.e. 1 based index, of the start column of the position in the text file.
StartLine The start line of the text source.
StartLineIndex Zero based index of the start line of the position in the text file.
StartLineNumber Number, i.e. 1 based index, of the start line of the position in the text file.
Text The text source.

Methods

Name Description
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

Name Description
op_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.