Share via


ProvideAssemblyFilterAttribute Class

Provides an assembly filter for an IConfigureToolboxItem object by describing the assemblies such an object supports.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

'宣言
<AttributeUsageAttribute(AttributeTargets.Class, Inherited := True, AllowMultiple := True)> _
Public NotInheritable Class ProvideAssemblyFilterAttribute _
    Inherits Attribute
'使用
Dim instance As ProvideAssemblyFilterAttribute
[AttributeUsageAttribute(AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
public sealed class ProvideAssemblyFilterAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, Inherited = true, AllowMultiple = true)]
public ref class ProvideAssemblyFilterAttribute sealed : public Attribute
public final class ProvideAssemblyFilterAttribute extends Attribute

Remarks

To be useful, a IConfigureToolboxItem object must be contained in a VSPackage using Package.

The ProvideAssemblyFilterAttribute objects applied to a given IConfigureToolboxItem object determine which ToolboxItem objects that IConfigureToolboxItem acts on.

A particular IConfigureToolboxItem object selects or filters on the basis of a ToolboxItem object's parent assembly. 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:

  • Assembly specification to ProvideAssemblyFilterAttribute uses 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 taken as a wildcard.

  • An assembly's name is set through the solution properties dialog. For more information, see Solution Property Pages Dialog Box.

Examples

The example below registers ToolboxConfig as providing configuration support for all ToolboxItem objects in all assemblies with a name of the form Vsip.*.

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

Inheritance Hierarchy

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Concepts

Toolbox (Visual Studio SDK)

Reference

ProvideAssemblyFilterAttribute Members

Microsoft.VisualStudio.Shell Namespace

AssemblyName

IConfigureToolboxItem

ToolboxItem

ProvideAssemblyFilterAttribute