Compartir a través de


ITextBufferFactoryService3.CreateTextBuffer Método

Definición

Sobrecargas

CreateTextBuffer(ITextImage, IContentType)

Crea un ITextBuffer objeto con el especificado IContentType y lo rellena con el texto contenido en image.

CreateTextBuffer(SnapshotSpan, IContentType)

Crea un ITextBuffer objeto con el especificado IContentType y lo rellena con el texto especificado contenido en span.

CreateTextBuffer(TextReader, IContentType, Int64, String)

Crea un ITextBuffer objeto con el especificado contentType y lo rellena leyendo datos del textReader especificado.

CreateTextBuffer(ITextImage, IContentType)

Crea un ITextBuffer objeto con el especificado IContentType y lo rellena con el texto contenido en image.

public:
 Microsoft::VisualStudio::Text::ITextBuffer ^ CreateTextBuffer(Microsoft::VisualStudio::Text::ITextImage ^ image, Microsoft::VisualStudio::Utilities::IContentType ^ contentType);
public Microsoft.VisualStudio.Text.ITextBuffer CreateTextBuffer(Microsoft.VisualStudio.Text.ITextImage image, Microsoft.VisualStudio.Utilities.IContentType contentType);
abstract member CreateTextBuffer : Microsoft.VisualStudio.Text.ITextImage * Microsoft.VisualStudio.Utilities.IContentType -> Microsoft.VisualStudio.Text.ITextBuffer
Public Function CreateTextBuffer (image As ITextImage, contentType As IContentType) As ITextBuffer

Parámetros

image
ITextImage

Texto inicial del búfer.

contentType
IContentType

IContentType de la nueva interfaz ITextBuffer.

Devoluciones

Objeto ITextBuffer con el texto y la interfaz IContentType especificados.

Excepciones

image o contentType es nulo.

Comentarios

Se puede llamar a este método en cualquier subproceso. Este método generará TextBufferCreated y ContentTypeChanged(ITextBuffer, IContentType, IContentType) en el subproceso al que se llamó.

Se aplica a

CreateTextBuffer(SnapshotSpan, IContentType)

Crea un ITextBuffer objeto con el especificado IContentType y lo rellena con el texto especificado contenido en span.

public:
 Microsoft::VisualStudio::Text::ITextBuffer ^ CreateTextBuffer(Microsoft::VisualStudio::Text::SnapshotSpan span, Microsoft::VisualStudio::Utilities::IContentType ^ contentType);
public Microsoft.VisualStudio.Text.ITextBuffer CreateTextBuffer(Microsoft.VisualStudio.Text.SnapshotSpan span, Microsoft.VisualStudio.Utilities.IContentType contentType);
abstract member CreateTextBuffer : Microsoft.VisualStudio.Text.SnapshotSpan * Microsoft.VisualStudio.Utilities.IContentType -> Microsoft.VisualStudio.Text.ITextBuffer
Public Function CreateTextBuffer (span As SnapshotSpan, contentType As IContentType) As ITextBuffer

Parámetros

span
SnapshotSpan

Texto inicial que se va a agregar.

contentType
IContentType

IContentType de la nueva interfaz ITextBuffer.

Devoluciones

Objeto ITextBuffer con el texto y la interfaz IContentType especificados.

Excepciones

span o contentType es nulo.

Comentarios

Se puede llamar a este método en cualquier subproceso. Este método generará TextBufferCreated y ContentTypeChanged(ITextBuffer, IContentType, IContentType) en el subproceso al que se llamó.

Se aplica a

CreateTextBuffer(TextReader, IContentType, Int64, String)

Crea un ITextBuffer objeto con el especificado contentType y lo rellena leyendo datos del textReader especificado.

public Microsoft.VisualStudio.Text.ITextBuffer CreateTextBuffer(System.IO.TextReader reader, Microsoft.VisualStudio.Utilities.IContentType contentType, long length = -1, string traceId = "");
abstract member CreateTextBuffer : System.IO.TextReader * Microsoft.VisualStudio.Utilities.IContentType * int64 * string -> Microsoft.VisualStudio.Text.ITextBuffer
Public Function CreateTextBuffer (reader As TextReader, contentType As IContentType, Optional length As Long = -1, Optional traceId As String = "") As ITextBuffer

Parámetros

reader
TextReader

TextReader desde el que se va a leer.

contentType
IContentType

contentType para el texto contenido en la nueva interfaz ITextBuffer

length
Int64

Longitud del archivo que respalda el lector de texto, si se conoce; en caso contrario, -1.

traceId
String

Identificador opcional que se usa en el seguimiento de depuración.

Devoluciones

Objeto ITextBuffer con textReader y contentTypeespecificados.

Excepciones

contentType es null.

Comentarios

Se puede llamar a este método en cualquier subproceso. Este método generará TextBufferCreated y ContentTypeChanged(ITextBuffer, IContentType, IContentType) en el subproceso al que se llamó.

Se aplica a