ITextBufferFactoryService::CreateTextBuffer Method (TextReader^, IContentType^)
Visual Studio 2015
Creates an ITextBuffer with the given content type and populates it by reading data from the specified text reader.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Parameters
- reader
-
Type:
System.IO::TextReader^
The TextReader from which to read.
- contentType
-
Type:
Microsoft.VisualStudio.Utilities::IContentType^
The 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.
| Exception | Condition |
|---|---|
| ArgumentNullException | reader is null or contentType is null. |
The reader is not closed by this operation. You must close the stream yourself.
Show: