ITextBufferFactoryService.CreateTextBuffer Method (IContentType)
Creates an empty ITextBuffer with the specified IContentType.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'宣告
Function CreateTextBuffer ( _
contentType As IContentType _
) As ITextBuffer
ITextBuffer CreateTextBuffer(
IContentType contentType
)
ITextBuffer^ CreateTextBuffer(
IContentType^ contentType
)
abstract CreateTextBuffer :
contentType:IContentType -> ITextBuffer
function CreateTextBuffer(
contentType : IContentType
) : ITextBuffer
Parameters
- contentType
Type: Microsoft.VisualStudio.Utilities.IContentType
The IContentType for the new ITextBuffer.
Return Value
Type: Microsoft.VisualStudio.Text.ITextBuffer
An empty ITextBuffer with the given IContentType.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | contentType is nulla null reference (Nothing in Visual Basic). |
.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.