ITextBuffer.TakeThreadOwnership Method
Claims ownership of this buffer for the current thread. All subsequent modifications of this ITextBuffer must be made from the current thread, or else an InvalidOperationException will be raised.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'宣言
Sub TakeThreadOwnership
void TakeThreadOwnership()
void TakeThreadOwnership()
abstract TakeThreadOwnership : unit -> unit
function TakeThreadOwnership()
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | This method has been called previously from a different thread, or a ITextBufferEdit object is active for this text buffer. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.