普通文本缓冲区的工厂服务。
命名空间: 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) | 创建一个具有指定的 IContentType 的 ITextBuffer,并使用给定文本填充它。 |
页首
事件
名称 | 说明 | |
---|---|---|
![]() |
TextBufferCreated | 在创建任何 ITextBuffer 时引发。 |
页首
备注
这是 MEF 组件,应导入使用以下语法:
[Import]
ITextBufferFactoryService TextBufferFactoryService =null;