ProvideKeyBindingTableAttribute 类

提供键约束表 GUID。

继承层次结构

System.Object
  System.Attribute
    Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.Shell.ProvideKeyBindingTableAttribute

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

语法

声明
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := True, Inherited := True)> _
Public NotInheritable Class ProvideKeyBindingTableAttribute _
    Inherits RegistrationAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class ProvideKeyBindingTableAttribute : RegistrationAttribute

ProvideKeyBindingTableAttribute 类型公开以下成员。

构造函数

  名称 说明
公共方法 ProvideKeyBindingTableAttribute 初始化 ProvideKeyBindingTableAttribute 新的实例指定的表和命名资源 ID 的.

页首

属性

  名称 说明
公共属性 AllowNavKeyBinding 获取或设置用户是否允许将新命令来导航键。
公共属性 NameResourceID 获取命名资源 ID.
公共属性 TableGuid 获取键约束表的 GUID。
公共属性 TypeId 获取此属性的当前实例。 (继承自 RegistrationAttribute。)

页首

方法

  名称 说明
公共方法 Equals 基础结构。返回一个值,该值指示此实例是否与指定的对象相等。 (继承自 Attribute。)
公共方法 GetHashCode 返回此实例的哈希代码。 (继承自 Attribute。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 IsDefaultAttribute 当在派生类中重写时,指示此实例的值是否是派生类的默认值。 (继承自 Attribute。)
公共方法 Match 当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。 (继承自 Attribute。)
公共方法 Register 调用注册特定上下文的此属性。 (重写 RegistrationAttribute.Register(RegistrationAttribute.RegistrationContext)。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)
公共方法 Unregister 移除了有关 VSPackage 中注册信息,在调用由外部注册工具 (如 regpkg.exe。有关更多信息,请参见 注册 Vspackage。 (重写 RegistrationAttribute.Unregister(RegistrationAttribute.RegistrationContext)。)

页首

显式接口实现

  名称 说明
显式接口实现私有方法 _Attribute.GetIDsOfNames 将一组名称映射为对应的一组调度标识符。 (继承自 Attribute。)
显式接口实现私有方法 _Attribute.GetTypeInfo 检索对象的类型信息,然后可以使用该信息获取接口的类型信息。 (继承自 Attribute。)
显式接口实现私有方法 _Attribute.GetTypeInfoCount 检索对象提供的类型信息接口的数量(0 或 1)。 (继承自 Attribute。)
显式接口实现私有方法 _Attribute.Invoke 提供对某一对象公开的属性和方法的访问。 (继承自 Attribute。)

页首

备注

此属性提供键约束表 GUID。 通过将此属性包中用于声明它具有给定的键约束表在其 .vsct。 这允许包提供其命令设置,而不会加载。 ,如果用户调用任何一个命令,包将加载。 有关 .vsct 文件的更多信息,请参见 VSCT XML 架构参考

注册表项

以下注册表项在此属性中注册时创建的:

VSROOT\KeyBindingTables\{TableGuid}
VSROOT\KeyBindingTables\{TableGuid}\@=#NameResourceID
VSROOT\KeyBindingTables\{TableGuid}\Package={PackageGuid}

线程安全

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

请参见

参考

Microsoft.VisualStudio.Shell 命名空间