次の方法で共有


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

'宣言
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

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

See Also

Reference

ITextBufferFactoryService Interface

CreateTextBuffer Overload

Microsoft.VisualStudio.Text Namespace