ITextBufferFactoryService Interface

The factory service for ordinary text buffers.

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

Syntax

'Declaration
Public Interface ITextBufferFactoryService
public interface ITextBufferFactoryService
public interface class ITextBufferFactoryService
type ITextBufferFactoryService =  interface end
public interface ITextBufferFactoryService

The ITextBufferFactoryService type exposes the following members.

Properties

  Name Description
Public property InertContentType A content type for which no associated artifacts are automatically created.
Public property PlaintextContentType Predefined content type for plain text files.
Public property TextContentType The text content type.

Top

Methods

  Name Description
Public method CreateTextBuffer() Creates an empty ITextBuffer with IContentType "text".
Public method CreateTextBuffer(IContentType) Creates an empty ITextBuffer with the specified IContentType.
Public method CreateTextBuffer(TextReader, IContentType) Creates an ITextBuffer with the given content type and populates it by reading data from the specified text reader.
Public method CreateTextBuffer(String, IContentType) Creates an ITextBuffer with the specified IContentType and populates it with the given text.

Top

Events

  Name Description
Public event TextBufferCreated Raised when any ITextBuffer is created.

Top

Remarks

This is a MEF Component, and should be imported with the following syntax:

[Import]
ITextBufferFactoryService TextBufferFactoryService =null;

See Also

Reference

Microsoft.VisualStudio.Text Namespace