IVsTextStream Interface
Provides reading and writing capabilities using one-dimensional coordinates.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'宣告
<InterfaceTypeAttribute()> _
<GuidAttribute("D3AF020B-A862-4D22-B373-20F1B30B7D9E")> _
Public Interface IVsTextStream _
Inherits IVsTextBuffer
'用途
Dim instance As IVsTextStream
[InterfaceTypeAttribute()]
[GuidAttribute("D3AF020B-A862-4D22-B373-20F1B30B7D9E")]
public interface IVsTextStream : IVsTextBuffer
[InterfaceTypeAttribute()]
[GuidAttribute(L"D3AF020B-A862-4D22-B373-20F1B30B7D9E")]
public interface class IVsTextStream : IVsTextBuffer
[<InterfaceTypeAttribute()>]
[<GuidAttribute("D3AF020B-A862-4D22-B373-20F1B30B7D9E")>]
type IVsTextStream =
interface
interface IVsTextBuffer
end
public interface IVsTextStream extends IVsTextBuffer
Remarks
The IVsTextStream interface provides access to the contents of a text buffer in as a linear stream of text using one-dimensional coordinates. Text is referred to as lines separated by end-of-line (EOL) indicators. Coordinates are of type Long. Using this interface imposes overhead resulting from the need to transform coordinates to and from a one-dimensional system. Do not use IVsTextStream with a buffer that contains Visual Basic text or the performance overhead can be severe. In general, use of stream coordinates is discouraged.
IVsTextStream fires the IVsTextStreamEvents interface, which is identical to IVsTextLinesEvents except for the coordinate system that describes the text. When IVsTextStream fires an event called IVsTextStreamEvents, the system informs you that the text or attributes in the buffer have changed.
Starting in Visual Studio 2010, you should access the text buffer on the UI thread, not on background threads. The text buffer no longer gets locked when you call LockBuffer or LockBufferEx. Similarly, the UnlockBuffer and UnlockBufferEx methods no longer have any effect.
Notes to Implementers
Implemented by text buffers in the environment.
Notes to Callers
Called by clients that want to access the text buffer using one-dimensional coordinates. You can use the text buffer object to read or change text.