Freigeben über


ITextBufferFactoryService.CreateTextBuffer-Methode (String, IContentType)

Erstellt einen ITextBuffer mit dem angegebenen IContentType und füllt ihn mit dem angegebenen Text auf.

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

Syntax

'Declaration
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

Parameter

  • text
    Typ: String

    Der hinzuzufügende Ausgangstext.

Rückgabewert

Typ: Microsoft.VisualStudio.Text.ITextBuffer
Ein ITextBuffer-Objekt mit dem angegebenen Text und IContentType.

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

Entweder text oder contentType ist nullein Nullverweis (Nothing in Visual Basic).

.NET Framework-Sicherheit

Siehe auch

Referenz

ITextBufferFactoryService Schnittstelle

CreateTextBuffer-Überladung

Microsoft.VisualStudio.Text-Namespace