Struct TextLine
Information about the character boundaries of a single line of text.
Assembly: Loretta.CodeAnalysis.dll
Syntax
public readonly struct TextLine
Properties
|
Improve this Doc
View Source
End
Gets the end position of the line not including the line break.
Declaration
public readonly int End { get; }
Property Value
|
Improve this Doc
View Source
EndIncludingLineBreak
Gets the end position of the line including the line break.
Declaration
public readonly int EndIncludingLineBreak { get; }
Property Value
|
Improve this Doc
View Source
LineNumber
Gets the zero-based line number.
Declaration
public readonly int LineNumber { get; }
Property Value
|
Improve this Doc
View Source
Span
Gets the line span not including the line break.
Declaration
public readonly TextSpan Span { get; }
Property Value
|
Improve this Doc
View Source
SpanIncludingLineBreak
Gets the line span including the line break.
Declaration
public readonly TextSpan SpanIncludingLineBreak { get; }
Property Value
|
Improve this Doc
View Source
Start
Gets the start position of the line.
Declaration
public readonly int Start { get; }
Property Value
|
Improve this Doc
View Source
Text
Declaration
public readonly SourceText Text { get; }
Property Value
Methods
|
Improve this Doc
View Source
Equals(TextLine)
Declaration
public readonly bool Equals(TextLine other)
Parameters
Returns
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override readonly bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
|
Improve this Doc
View Source
FromSpan(SourceText, TextSpan)
Declaration
public static TextLine FromSpan(SourceText text, TextSpan span)
Parameters
Type |
Name |
Description |
SourceText |
text |
The source text.
|
TextSpan |
span |
The span of the line.
|
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Overrides
|
Improve this Doc
View Source
ToString()
Returns the text for this line.
Declaration
public override readonly string ToString()
Returns
Overrides
Operators
|
Improve this Doc
View Source
Equality(TextLine, TextLine)
Checks whether two text lines are equal.
Declaration
public static bool operator ==(TextLine left, TextLine right)
Parameters
Returns
|
Improve this Doc
View Source
Inequality(TextLine, TextLine)
Checks whether two text lines are not equal.
Declaration
public static bool operator !=(TextLine left, TextLine right)
Parameters
Returns
Implements
IEquatable<>