Freigeben über


IVsTextScanner Interface

Definition

A special-purpose interface exposed by text buffers and used to provide fast, stream-oriented, sequential access to the text in the buffer.

public interface class IVsTextScanner
public interface class IVsTextScanner
__interface IVsTextScanner
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("EBD73923-C190-45C1-91C5-0BC61A8AAB14")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsTextScanner
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("EBD73923-C190-45C1-91C5-0BC61A8AAB14")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsTextScanner
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("EBD73923-C190-45C1-91C5-0BC61A8AAB14")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsTextScanner = interface
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("EBD73923-C190-45C1-91C5-0BC61A8AAB14")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsTextScanner = interface
Public Interface IVsTextScanner
Attributes

Remarks

IVsTextScanner is particularly useful to compilers, which need rapid, sequential, stream-oriented access to text in the text buffer. However, this interface locks the buffer and performs a garbage-collection pass, which incurs an expensive performance hit. Use of this interface is therefore not recommended in scenarios such as performing a query status on the handler or other performance-sensitive scenarios.

This interface allows you to obtain selected text from the text buffer. If you need access to the full contents of the text buffer, consider using IVsFullTextScanner.

Notes to Implementers

Implement IVsTextScanner to obtain quick access to the text buffer.

Methods

CloseScan()

Closes the buffer for scanning and re-enables writing to the buffer.

OpenScan()

Opens the text buffer for scanning.

Read(String, Int32)

Performs a scan of the text buffer, or portion of the text buffer defined by the string length, piLength.

Applies to