ITextSnapshot 接口

定义

为包含 Unicode 字符序列的的不可变快照提供读取访问权限 ITextBuffer 。 序列中的第一个字符的索引为零。

public interface class ITextSnapshot
public interface class ITextSnapshot
__interface ITextSnapshot
public interface ITextSnapshot
type ITextSnapshot = interface
Public Interface ITextSnapshot
派生

注解

有关文本快照的详细信息,请参阅 编辑器内的 "文本模型和文本视图"。

序列中的第一个字符的索引为零。

属性

ContentType

IContentType TextBuffer 此快照为当前快照时的。

Item[Int32]

获取位于指定位置的单个字符。

Length

获取快照中包含的 UTF-16 字符数。

LineCount

获取快照中的正数。 其为零的快照被 Length 视为具有一行。

Lines

快照中的行集的枚举器。

TextBuffer

ITextBuffer此为快照的。

Version

此表示的的版本 ITextBuffer ITextSnapshot

方法

CopyTo(Int32, Char[], Int32, Int32)

将一定范围的文本复制到字符数组。

CreateTrackingPoint(Int32, PointTrackingMode)

ITrackingPoint根据此快照创建一个。

CreateTrackingPoint(Int32, PointTrackingMode, TrackingFidelityMode)

ITrackingPoint根据此快照创建一个。

CreateTrackingSpan(Int32, Int32, SpanTrackingMode)

ITrackingSpan根据此快照创建一个。

CreateTrackingSpan(Int32, Int32, SpanTrackingMode, TrackingFidelityMode)

ITrackingSpan根据此快照创建一个。

CreateTrackingSpan(Span, SpanTrackingMode)

ITrackingSpan根据此快照创建一个。

CreateTrackingSpan(Span, SpanTrackingMode, TrackingFidelityMode)

ITrackingSpan根据此快照创建一个。

GetLineFromLineNumber(Int32)

获取 ITextSnapshotLine 给定行号的。

GetLineFromPosition(Int32)

获取 ITextSnapshotLine 给定位置处的行的。

GetLineNumberFromPosition(Int32)

获取包含位于指定位置的字符的行号。

GetText()

获取快照中的所有文本。

GetText(Int32, Int32)

获取从开始、长度等于的的快照中的文本 startIndex length

GetText(Span)

从位于跨度开头开始、长度等于范围长度的快照中获取文本。

ToCharArray(Int32, Int32)

将文本范围转换为字符数组。

Write(TextWriter)

写入快照的内容。

Write(TextWriter, Span)

写入快照内容的子字符串。

适用于