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: StringO texto inicial a ser adicionado.
contentType
Tipo: Microsoft.VisualStudio.Utilities.IContentTypeThe IContentType for the new ITextBuffer.
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
- Confiança total para o chamador imediato. O membro não pode ser usado por código parcialmente confiável. Para obter mais informações, consulte Usando bibliotecas de código parcialmente confiável.