ITextBufferFactoryService.CreateTextBuffer Method (TextReader, IContentType)

Creates an ITextBuffer with the given content type and populates it by reading data from the specified text reader.

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


Function CreateTextBuffer ( _
    reader As TextReader, _
    contentType As IContentType _
) As ITextBuffer
ITextBuffer CreateTextBuffer(
    TextReader reader,
    IContentType contentType
ITextBuffer^ CreateTextBuffer(
    TextReader^ reader, 
    IContentType^ contentType
abstract CreateTextBuffer : 
        reader:TextReader * 
        contentType:IContentType -> ITextBuffer 
function CreateTextBuffer(
    reader : TextReader, 
    contentType : IContentType
) : ITextBuffer


Return Value

Type: Microsoft.VisualStudio.Text.ITextBuffer
An ITextBuffer object with the given text reader and content type.


Exception Condition

reader is nulla null reference (Nothing in Visual Basic) or contentType is nulla null reference (Nothing in Visual Basic).


The reader is not closed by this operation. You must close the stream yourself.

.NET Framework Security

See Also


ITextBufferFactoryService Interface

CreateTextBuffer Overload

Microsoft.VisualStudio.Text Namespace