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)
Syntax
'Declaration
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
Parameters
reader
Type: TextReaderThe TextReader from which to read.
contentType
Type: Microsoft.VisualStudio.Utilities.IContentTypeThe contentType for the text contained in the new ITextBuffer
Return Value
Type: Microsoft.VisualStudio.Text.ITextBuffer
An ITextBuffer object with the given text reader and content type.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | reader is nulla null reference (Nothing in Visual Basic) or contentType is nulla null reference (Nothing in Visual Basic). |
Remarks
The reader is not closed by this operation. You must close the stream yourself.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.