OleUndoEngine.UndoUnit 类

extends 用于封装用户可以取消的工作单元支持。

继承层次结构

System.Object
  System.ComponentModel.Design.UndoEngine.UndoUnit
    Microsoft.VisualStudio.Shell.Design.OleUndoEngine.UndoUnit

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

语法

声明
Protected Class UndoUnit _
    Inherits UndoEngine.UndoUnit _
    Implements IOleParentUndoUnit, IOleUndoUnit
protected class UndoUnit : UndoEngine.UndoUnit, 
    IOleParentUndoUnit, IOleUndoUnit

OleUndoEngine.UndoUnit 类型公开以下成员。

构造函数

  名称 说明
公共方法 OleUndoEngine.UndoUnit 初始化 OleUndoEngine.UndoUnit 类的新实例。

页首

属性

  名称 说明
公共属性 IsEmpty 获取一个值,该值指示 UndoEngine.UndoUnit 是否不包含事件。 (继承自 UndoEngine.UndoUnit。)
公共属性 Name 获取 UndoEngine.UndoUnit 的名称。 (继承自 UndoEngine.UndoUnit。)
受保护的属性 UndoEngine 获取父 UndoEngine。 (继承自 UndoEngine.UndoUnit。)

页首

方法

  名称 说明
公共方法 Close 接收来自撤消引擎的调用以关闭此单元。 (继承自 UndoEngine.UndoUnit。)
公共方法 ComponentAdded 接收来自 UndoEngine 的调用以响应 ComponentAdded 事件。 (继承自 UndoEngine.UndoUnit。)
公共方法 ComponentAdding 接收来自 UndoEngine 的调用以响应 ComponentAdding 事件。 (继承自 UndoEngine.UndoUnit。)
公共方法 ComponentChanged 接收来自 UndoEngine 的调用以响应 ComponentChanged 事件。 (继承自 UndoEngine.UndoUnit。)
公共方法 ComponentChanging 接收来自 UndoEngine 的调用以响应 ComponentChanging 事件。 (继承自 UndoEngine.UndoUnit。)
公共方法 ComponentRemoved 接收来自 UndoEngine 的调用以响应 ComponentRemoved 事件。 (继承自 UndoEngine.UndoUnit。)
公共方法 ComponentRemoving 接收来自 UndoEngine 的调用以响应 ComponentRemoving 事件。 (继承自 UndoEngine.UndoUnit。)
公共方法 ComponentRename 接收来自 UndoEngine 的调用以响应 ComponentRename 事件。 (继承自 UndoEngine.UndoUnit。)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
受保护的方法 GetService 获取所请求服务的实例。 (继承自 UndoEngine.UndoUnit。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 ToString 返回 String,它表示单元的当前名称。 (继承自 UndoEngine.UndoUnit。)
公共方法 Undo 执行撤消或重复操作。 (继承自 UndoEngine.UndoUnit。)
受保护的方法 UndoCore Undo 调用以执行撤消操作。 (继承自 UndoEngine.UndoUnit。)

页首

显式接口实现

  名称 说明
显式接口实现私有方法 IOleParentUndoUnit.Add 添加一个抵消单位到父集合。
显式接口实现私有方法 IOleParentUndoUnit.Close 关闭指定的父抵消单位。
显式接口实现私有方法 IOleParentUndoUnit.Do 执行取消操作。
显式接口实现私有方法 IOleParentUndoUnit.FindUnit 搜索在子任务的指定单元抵消单位层次结构。
显式接口实现私有方法 IOleParentUndoUnit.GetDescription 获取抵消单位的说明。
显式接口实现私有方法 IOleParentUndoUnit.GetParentState 获取顶级父级状态抵消单位。
显式接口实现私有方法 IOleParentUndoUnit.GetUnitType 获取抵消单位的类型。
显式接口实现私有方法 IOleParentUndoUnit.OnNextAdd 通知次移除集合中的单元新的单元添加了。
显式接口实现私有方法 IOleParentUndoUnit.Open 打开抵消单位。
显式接口实现私有方法 IOleUndoUnit.Do 执行取消操作。
显式接口实现私有方法 IOleUndoUnit.GetDescription 获取抵消单位的说明。
显式接口实现私有方法 IOleUndoUnit.GetUnitType 获取抵消单位的类型。
显式接口实现私有方法 IOleUndoUnit.OnNextAdd 通知次移除集合中的单元新的单元添加了。

页首

备注

OleUndoEngine.UndoUnit 类是封装事件用户可以通过监视更改通知取消并生成事件列表每项更改的。 OleUndoEngine 中的嵌套类。

它使用 IDesignerSerializationService 保存这些事件。OleUndoEngine.UndoUnit 通过从 UndoEngine.UndoUnit派生的方法接收更改的事件通知, IOleParentUndoUnit

IOleUndoUnit

通过实现 UndoEngine.UndoUnitIOleParentUndoUnitIOleUndoUnit, OleUndoEngine.UndoUnit 可以更好地支持链接通过提供父级之间的显式连接取消,并且子抵消单位。

线程安全

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

请参见

参考

Microsoft.VisualStudio.Shell.Design 命名空间

OleUndoEngine

UndoEngine.UndoUnit

IOleParentUndoUnit

IOleUndoUnit