使用指定的文本快照初始化 TextSnapshotToTextReader 的新实例。
命名空间: Microsoft.VisualStudio.Text
程序集: Microsoft.VisualStudio.Text.Data(在 Microsoft.VisualStudio.Text.Data.dll 中)
语法
声明
Public Sub New ( _
textSnapshot As ITextSnapshot _
)
public TextSnapshotToTextReader(
ITextSnapshot textSnapshot
)
public:
TextSnapshotToTextReader(
ITextSnapshot^ textSnapshot
)
new :
textSnapshot:ITextSnapshot -> TextSnapshotToTextReader
public function TextSnapshotToTextReader(
textSnapshot : ITextSnapshot
)
参数
textSnapshot
类型:Microsoft.VisualStudio.Text.ITextSnapshot要作为读取器公开的 ITextSnapshot。
异常
异常 | 条件 |
---|---|
ArgumentNullException | textSnapshot 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。