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
'Declaração
<InterfaceTypeAttribute()> _
<GuidAttribute("D3AF020B-A862-4D22-B373-20F1B30B7D9E")> _
Public Interface IVsTextStream _
Inherits IVsTextBuffer
[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
The IVsTextStream type exposes the following members.
Methods
Name | Description | |
---|---|---|
AdviseTextStreamEvents | Not implemented. | |
CanReplaceStream | Tests whether a given editing operation can succeed (for example, copy or cut). | |
CreateEditPoint | Creates an EditPoint object at the given location in the text buffer. | |
CreateStreamMarker | Creates a stream marker of a given type over the specified region. | |
CreateTextPoint | Creates a TextPoint object at the given location in the text buffer. | |
EnumMarkers | Enumerates s specific set of text stream markers, based on the criteria specified. | |
FindMarkerByPosition | Locates a marker of a given type based on a position in the text stream. | |
GetLanguageServiceID(Guid%) | Returns the unique identifier of the language that is providing colorization and other attribute data to this buffer. (Inherited from IVsTextBuffer.) | |
GetLanguageServiceID(Guid%) | Returns the unique identifier of the language that is providing colorization and other attribute data to this buffer. | |
GetLastLineIndex(Int32%, Int32%) | Returns the last line in the text buffer. (Inherited from IVsTextBuffer.) | |
GetLastLineIndex(Int32%, Int32%) | Returns the last line in the text buffer. | |
GetLengthOfLine(Int32, Int32%) | Returns the length of a line in the buffer. (Inherited from IVsTextBuffer.) | |
GetLengthOfLine(Int32, Int32%) | Returns the length of a line in the buffer. | |
GetLineCount(Int32%) | Returns the number of lines in the buffer. (Inherited from IVsTextBuffer.) | |
GetLineCount(Int32%) | Returns the number of lines in the buffer. | |
GetLineIndexOfPosition(Int32, Int32%, Int32%) | Returns the line and column numbers in the text buffer, given a position number. (Inherited from IVsTextBuffer.) | |
GetLineIndexOfPosition(Int32, Int32%, Int32%) | Returns the line and column numbers in the text buffer, given a position number. | |
GetPositionOfLine(Int32, Int32%) | Returns the position number of a line. (Inherited from IVsTextBuffer.) | |
GetPositionOfLine(Int32, Int32%) | Returns the position number of a line. | |
GetPositionOfLineIndex(Int32, Int32, Int32%) | Returns the position number in the text buffer, given a line and column number. (Inherited from IVsTextBuffer.) | |
GetPositionOfLineIndex(Int32, Int32, Int32%) | Returns the position number in the text buffer, given a line and column number. | |
GetSize(Int32%) | Returns the size in characters of the buffer. (Inherited from IVsTextBuffer.) | |
GetSize(Int32%) | Returns the size in characters of the buffer. | |
GetStateFlags(UInt32%) | Returns the state flags of the text buffer. (Inherited from IVsTextBuffer.) | |
GetStateFlags(UInt32%) | Returns the state flags of the text buffer. | |
GetStream | Provides direct, stream-oriented access to the text buffer. | |
GetUndoManager(IOleUndoManager%) | Returns the undo manager for this buffer. (Inherited from IVsTextBuffer.) | |
GetUndoManager(IOleUndoManager%) | Returns the undo manager for this buffer. | |
InitializeContent(String, Int32) | Initializes the content of the text buffer. (Inherited from IVsTextBuffer.) | |
InitializeContent(String, Int32) | Initializes the content of the text buffer. | |
LockBuffer() | Has no effect. Deprecated. (Inherited from IVsTextBuffer.) | |
LockBuffer() | Locks the text buffer for the purpose of access control. | |
LockBufferEx(UInt32) | Has no effect. Deprecated. (Inherited from IVsTextBuffer.) | |
LockBufferEx(UInt32) | Extension of the LockBuffer method. | |
Reload(Int32) | Reloads the text buffer. (Inherited from IVsTextBuffer.) | |
Reload(Int32) | Reloads the text buffer. | |
ReloadStream | Replaces text without deleting markers. | |
ReplaceStream | Handles editing, such as line breaking, line joining, and so on. | |
ReplaceStreamEx | Handles editing, such as line breaking, line joining, and so on. | |
Reserved1() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved1() | Reserved in the Vtable for future use. | |
Reserved10() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved10() | Reserved in the Vtable for future use. | |
Reserved2() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved2() | Reserved in the Vtable for future use. | |
Reserved3() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved3() | Reserved in the Vtable for future use. | |
Reserved4() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved4() | Reserved in the Vtable for future use. | |
Reserved5() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved5() | Reserved in the Vtable for future use. | |
Reserved6() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved6() | Reserved in the Vtable for future use. | |
Reserved7() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved7() | Reserved in the Vtable for future use. | |
Reserved8() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved8() | Reserved in the Vtable for future use. | |
Reserved9() | Reserved in the Vtable for future use. (Inherited from IVsTextBuffer.) | |
Reserved9() | Reserved in the Vtable for future use. | |
SetLanguageServiceID(Guid%) | Sets the unique identifier of the language that is providing colorization and other attribute data to the buffer. (Inherited from IVsTextBuffer.) | |
SetLanguageServiceID(Guid%) | Sets the unique identifier of the language that is providing colorization and other attribute data to the buffer. | |
SetStateFlags(UInt32) | Sets the state flags of the text buffer. (Inherited from IVsTextBuffer.) | |
SetStateFlags(UInt32) | Sets the state flags of the text buffer. | |
UnadviseTextStreamEvents | Not implemented. | |
UnlockBuffer() | Has no effect. Deprecated. (Inherited from IVsTextBuffer.) | |
UnlockBuffer() | Unlocks a buffer locked with the method LockBuffer. | |
UnlockBufferEx(UInt32) | Has no effect. Deprecated. (Inherited from IVsTextBuffer.) | |
UnlockBufferEx(UInt32) | Extension of the UnlockBuffer method. |
Top
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.