ITextBufferFactoryService 接口

普通文本缓冲区的工厂服务。

命名空间:  Microsoft.VisualStudio.Text
程序集:  Microsoft.VisualStudio.Text.Data(在 Microsoft.VisualStudio.Text.Data.dll 中)

语法

声明
Public Interface ITextBufferFactoryService
public interface ITextBufferFactoryService
public interface class ITextBufferFactoryService
type ITextBufferFactoryService =  interface end
public interface ITextBufferFactoryService

ITextBufferFactoryService 类型公开以下成员。

属性

  名称 说明
公共属性 InertContentType 会自动创建无关联项目的内容类型。
公共属性 PlaintextContentType 纯文本文件的预定义内容类型。
公共属性 TextContentType 文本内容类型。

页首

方法

  名称 说明
公共方法 CreateTextBuffer() 创建一个 IContentType 为“text”的空 ITextBuffer
公共方法 CreateTextBuffer(IContentType) 创建一个具有指定的 IContentType 的空 ITextBuffer
公共方法 CreateTextBuffer(TextReader, IContentType) 用特定内容类型创建 ITextBuffer 并从指定的文本读取器读取数据填充该实例。
公共方法 CreateTextBuffer(String, IContentType) 创建一个具有指定的 IContentTypeITextBuffer,并使用给定文本填充它。

页首

事件

  名称 说明
公共事件 TextBufferCreated 在创建任何 ITextBuffer 时引发。

页首

备注

这是 MEF 组件,应导入使用以下语法:

[Import]
ITextBufferFactoryService TextBufferFactoryService =null;

请参阅

参考

Microsoft.VisualStudio.Text 命名空间