C# Класс AvalonStudio.TextEditor.Document.DocumentLine

Represents a line inside a TextDocument.

The TextDocument.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.

Наследование: IDocumentLine
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
DebugVerifyAccess void
DocumentLine System
InitLineNode DocumentLine
ResetLine void

Открытые методы

Метод Описание
ToString ( ) : string

Gets a string with debug output showing the line number and offset. Does not include the line's text.

Приватные методы

Метод Описание
DebugVerifyAccess ( ) : void
DocumentLine ( TextDocument document ) : System
InitLineNode ( ) : DocumentLine
ResetLine ( ) : void

Resets the line to enable its reuse after a document rebuild.

Описание методов

ToString() публичный Метод

Gets a string with debug output showing the line number and offset. Does not include the line's text.
public ToString ( ) : string
Результат string