Sdílet prostřednictvím


ProvideAssemblyFilterAttribute Class

Definition

Describes the assemblies that the IConfigureToolboxItem class supports.

public ref class ProvideAssemblyFilterAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ProvideAssemblyFilterAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type ProvideAssemblyFilterAttribute = class
    inherit Attribute
Public NotInheritable Class ProvideAssemblyFilterAttribute
Inherits Attribute
Inheritance
ProvideAssemblyFilterAttribute
Attributes

Examples

The example below registers the ToolboxConfig class as providing configuration support for all ToolboxItem classes in all assemblies that have a name beginning with Vsip.

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

Remarks

An IConfigureToolboxItem must be contained in a VSPackage.

The ProvideAssemblyFilterAttribute attributes are applied to a IConfigureToolboxItem in order to specify which ToolboxItem objects are configured by the IConfigureToolboxItem object.

A IConfigureToolboxItem class filters these assemblies on the basis of the parent assembly of the ToolboxItem class. This parent assembly is specified in the constructor ProvideAssemblyFilterAttribute, which is used to create a given instance of ProvideAssemblyFilterAttribute applied to that IConfigureToolboxItem object.

When specifying an assembly:

  • The ProvideAssemblyFilterAttribute specifies the full assembly identification, including a simple name, a version number, a cryptographic key pair, and a supported culture. For more information on assembly identification, see AssemblyName. The * character in a specification is interpreted as a wildcard.

  • The assembly name is set through the solution properties dialog.

Constructors

ProvideAssemblyFilterAttribute(String)

Creates a new instance of a ProvideAssemblyFilterAttribute object with the specified assembly name.

Properties

AssemblyFilter

Gets the full assembly specification of the filter.

Applies to