C# | Visual Basic | Visual C++ |
public sealed class DocumentLine : IDocumentLine, ISegment
Public NotInheritable Class DocumentLine _ Implements IDocumentLine, ISegment
public ref class DocumentLine sealed : IDocumentLine, ISegment
All Members | Methods | Properties | |||
Icon | Member | Description |
---|---|---|
Contains(ISegment, Int32, Int32) |
Gets whether segment fully contains the specified segment.
(Inherited from ISegmentExtensions.) | |
Contains(ISegment, ISegment) |
Gets whether thisSegment fully contains the specified segment.
(Inherited from ISegmentExtensions.) | |
DelimiterLength | Gets the length of the line delimiter. The value is 1 for single "\r" or "\n", 2 for the "\r\n" sequence; and 0 for the last line in the document. | |
EndOffset |
Gets the end offset of the line in the document's text (the offset before the line delimiter).
Runtime: O(log n)
| |
Equals(Object) | (Inherited from Object.) | |
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType()()()() | Gets the Type of the current instance. (Inherited from Object.) | |
IsDeleted |
Gets if this line was deleted from the document.
| |
Length |
Gets the length of this line. The length does not include the line delimiter. O(1)
| |
LineNumber |
Gets the number of this line.
Runtime: O(log n)
| |
NextLine |
Gets the next line in the document.
| |
Offset |
Gets the starting offset of the line in the document's text.
Runtime: O(log n)
| |
PreviousLine |
Gets the previous line in the document.
| |
ToString()()()() |
Gets a string with debug output showing the line number and offset.
Does not include the line's text.
(Overrides Object.ToString()()()().) | |
TotalLength |
Gets the length of this line, including the line delimiter. O(1)
|
The Lines collection contains one DocumentLine instance for every line in the document. This collection is read-only to user code and is automatically updated to reflect the current document content.
Internally, the DocumentLine instances are arranged in a binary tree that allows for both efficient updates and lookup. Converting between offset and line number is possible in O(lg N) time, and the data structure also updates all offsets in O(lg N) whenever a line is inserted or removed.
Object | |
DocumentLine |
Assembly: ICSharpCode.AvalonEdit (Module: ICSharpCode.AvalonEdit.dll) Version: 5.0.0.4238