声明当前线程对此缓冲区的所有权。 对此 ITextBuffer 的所有后续修改都必须从当前线程中进行,否则将引发 InvalidOperationException。
命名空间: Microsoft.VisualStudio.Text
程序集: Microsoft.VisualStudio.Text.Data(在 Microsoft.VisualStudio.Text.Data.dll 中)
语法
声明
Sub TakeThreadOwnership
void TakeThreadOwnership()
void TakeThreadOwnership()
abstract TakeThreadOwnership : unit -> unit
function TakeThreadOwnership()
异常
异常 | 条件 |
---|---|
InvalidOperationException | 此方法从不同的线程之前调用,或者 ITextBufferEdit 对象用于此文本缓冲区处于活动状态。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。