Compartilhar via


Método ITextBufferFactoryService.CreateTextBuffer (String, IContentType)

Cria um ITextBuffer com a versão especificada IContentType e a preenche com texto fornecido.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (em Microsoft.VisualStudio.Text.Data.dll)

Sintaxe

'Declaração
Function CreateTextBuffer ( _
    text As String, _
    contentType As IContentType _
) As ITextBuffer
ITextBuffer CreateTextBuffer(
    string text,
    IContentType contentType
)
ITextBuffer^ CreateTextBuffer(
    String^ text, 
    IContentType^ contentType
)
abstract CreateTextBuffer : 
        text:string * 
        contentType:IContentType -> ITextBuffer
function CreateTextBuffer(
    text : String, 
    contentType : IContentType
) : ITextBuffer

Parâmetros

  • text
    Tipo: String

    O texto inicial a ser adicionado.

Valor de retorno

Tipo: Microsoft.VisualStudio.Text.ITextBuffer
A ITextBuffer o objeto com texto fornecido e IContentType.

Exceções

Exceção Condição
ArgumentNullException

Either text or contentType is nulluma referência nula (Nothing no Visual Basic).

Segurança do .NET Framework

Consulte também

Referência

ITextBufferFactoryService Interface

Sobrecargas CreateTextBuffer

Namespace Microsoft.VisualStudio.Text