维护文本缓冲区和 ITextUndoHistory 对象之间的关系。
命名空间: Microsoft.VisualStudio.Text.Operations
程序集: Microsoft.VisualStudio.Text.Logic(在 Microsoft.VisualStudio.Text.Logic.dll 中)
语法
声明
Public Interface ITextUndoHistoryRegistry
public interface ITextUndoHistoryRegistry
public interface class ITextUndoHistoryRegistry
type ITextUndoHistoryRegistry = interface end
public interface ITextUndoHistoryRegistry
ITextUndoHistoryRegistry 类型公开以下成员。
方法
名称 | 说明 | |
---|---|---|
![]() |
AttachHistory | 附加现有 ITextUndoHistory 到文本缓冲区。此注册表不能已映射缓冲区。 |
![]() |
GetHistory | 获取历史记录与文本缓冲区,但是,不会创建新的。 |
![]() |
RegisterHistory | 获取并根据需要创建与上下文关联的历史记录。 |
![]() |
RemoveHistory | 在此注册表中移除指向给定 ITextUndoHistory 的所有映射(如果存在)。 |
![]() |
TryGetHistory | 获取历史记录与文本缓冲区,但是,不会创建新的。 |
页首
备注
这是 MEF 组件部件,应导入如下所示:
[Import]
ITextUndoHistoryRegistry registry = null;