针对 Change 事件初始化 TextSnapshotChangedEventArgs 的新实例。
命名空间: Microsoft.VisualStudio.Text
程序集: Microsoft.VisualStudio.Text.Data(在 Microsoft.VisualStudio.Text.Data.dll 中)
语法
声明
Protected Sub New ( _
beforeSnapshot As ITextSnapshot, _
afterSnapshot As ITextSnapshot, _
editTag As Object _
)
protected TextSnapshotChangedEventArgs(
ITextSnapshot beforeSnapshot,
ITextSnapshot afterSnapshot,
Object editTag
)
protected:
TextSnapshotChangedEventArgs(
ITextSnapshot^ beforeSnapshot,
ITextSnapshot^ afterSnapshot,
Object^ editTag
)
new :
beforeSnapshot:ITextSnapshot *
afterSnapshot:ITextSnapshot *
editTag:Object -> TextSnapshotChangedEventArgs
protected function TextSnapshotChangedEventArgs(
beforeSnapshot : ITextSnapshot,
afterSnapshot : ITextSnapshot,
editTag : Object
)
参数
beforeSnapshot
类型:Microsoft.VisualStudio.Text.ITextSnapshot发生更改之前的最新 ITextSnapshot。
afterSnapshot
类型:Microsoft.VisualStudio.Text.ITextSnapshot发生更改之后立即生成的 ITextSnapshot。
editTag
类型:Object对象与此更改。
异常
异常 | 条件 |
---|---|
ArgumentNullException | beforeSnapshot 或 afterSnapshot 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。