Export (0) Print
Expand All

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)

[AttributeUsageAttribute(AttributeTargets.Class, Inherited=true, AllowMultiple=true)] 
public sealed class ProvideAssemblyFilterAttribute : Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class, Inherited=true, AllowMultiple=true) */ 
public final class ProvideAssemblyFilterAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Class, Inherited=true, AllowMultiple=true) 
public final class ProvideAssemblyFilterAttribute extends Attribute

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.

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 

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

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

Community Additions

ADD
Show:
© 2014 Microsoft