ProvideAssemblyFilterAttribute 类

描述 IConfigureToolboxItem 类支持的程序集。

继承层次结构

System.Object
  System.Attribute
    Microsoft.VisualStudio.Shell.ProvideAssemblyFilterAttribute

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

语法

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

ProvideAssemblyFilterAttribute 类型公开以下成员。

构造函数

  名称 说明
公共方法 ProvideAssemblyFilterAttribute 使用指定的程序集名称创建 ProvideAssemblyFilterAttribute 对象的新实例。

页首

属性

  名称 说明
公共属性 AssemblyFilter 获取筛选器的完整程序集规范。
公共属性 TypeId 当在派生类中实现时,获取该 Attribute 的唯一标识符。 (继承自 Attribute。)

页首

方法

  名称 说明
公共方法 Equals 基础结构。返回一个值,该值指示此实例是否与指定的对象相等。 (继承自 Attribute。)
公共方法 GetHashCode 返回此实例的哈希代码。 (继承自 Attribute。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 IsDefaultAttribute 当在派生类中重写时,指示此实例的值是否是派生类的默认值。 (继承自 Attribute。)
公共方法 Match 当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。 (继承自 Attribute。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

显式接口实现

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

页首

备注

必须在 VSPackage 中包含 IConfigureToolboxItem

ProvideAssemblyFilterAttribute 特性应用于 IConfigureToolboxItem 以便指定 IConfigureToolboxItem 对象配置以及 ToolboxItem 对象。

IConfigureToolboxItem 类根据 ToolboxItem 类的父程序集筛选这些程序集。此父程序集在构造函数 ProvideAssemblyFilterAttribute指定,用于创建 ProvideAssemblyFilterAttribute 特定实例应用于该 IConfigureToolboxItem 对象。

当指定程序集时:

  • ProvideAssemblyFilterAttribute 指定完整的程序集标识,包括简单名称,版本号,加密密钥对和支持的区域性。有关程序集标识的更多信息,请参见 AssemblyName。* 规范中的字符被解释为通配符。

  • 程序集名称通过解决方案属性对话框设置。

示例

在为提供配置的 ToolboxConfig 类为中的所有程序集的所有 ToolboxItem 类支持具有名称从 Vsip启动注册下面的示例。

    [ProvideAssemblyFilterAttribute("Vsip.*, Version=*, Culture=*, PublicKeyToken=*")]
    public sealed class ToolboxConfig : IConfigureToolboxItem 

线程安全

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

请参见

参考

Microsoft.VisualStudio.Shell 命名空间

AssemblyName

IConfigureToolboxItem

ToolboxItem

ProvideAssemblyFilterAttribute

其他资源

工具箱 (Visual Studio SDK)