UndoManager 类

包装 Visual Studio shell 的帮助器类取消管理器。

此 API 不兼容 CLS。 

继承层次结构

System.Object
  Microsoft.VisualStudio.Modeling.Shell.UndoManager

命名空间:  Microsoft.VisualStudio.Modeling.Shell
程序集:  Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0.dll 中)

语法

声明
<CLSCompliantAttribute(False)> _
Public Class UndoManager _
    Implements IOleCommandTarget, IVsLinkedUndoClient, IDisposable
[CLSCompliantAttribute(false)]
public class UndoManager : IOleCommandTarget, 
    IVsLinkedUndoClient, IDisposable

UndoManager 类型公开以下成员。

构造函数

  名称 说明
公共方法 UndoManager(IServiceProvider) 创建包装 IOleUndoManager 新实例的 UndoManager。
公共方法 UndoManager(IServiceProvider, IOleUndoManager) 使用指定的服务提供程序以及 IOleUndoManager 创建新的 UndoManager。

页首

属性

  名称 说明
公共属性 IsDirty
公共属性 VSUndoManager 这是应该驱动器任何内容。若要使用此撤消管理器的窗架的 SEID。我们无法包装在托管对象中 IOleUndoManager,因为 MS.VS.NativeMethods.IOleCommandTarget 的属性浏览器中的,是私有的,因此,我们无法实现它会在该类。

页首

方法

  名称 说明
公共方法 Add 添加一个抵消单位堆栈和更新 UI。
公共方法 DiscardUndoStacks 引发撤消/重做堆栈。如果 bool 为 true,则除了放弃 undostack 外实例将指示堆栈如干净。
公共方法 Dispose() 释放由 UndoManager 类的当前实例占用的所有资源。
受保护的方法 Dispose(Boolean) 配置该状态此对象。
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
公共方法 Exec IOleCommandTarget 接口的实现。通过调用包装 IOleUndoManager。
受保护的方法 Finalize 终结器。 (重写 Object.Finalize()。)
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 OnInterveningUnitBlockingLinkedUndo 指示取消管理器块另一个取消从执行一个链接的事件管理器的。
公共方法 QueryStatus IOleCommandTarget 接口的实现。通过调用包装 IOleUndoManager 实例。
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.VisualStudio.Modeling.Shell 命名空间