ProvideAssemblyFilterAttribute Class

 

Describes the assemblies that the IConfigureToolboxItem class supports.

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

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

[AttributeUsageAttribute(AttributeTargets.Class, Inherited = true, 
	AllowMultiple = true)]
public sealed class ProvideAssemblyFilterAttribute : Attribute

NameDescription
System_CAPS_pubmethodProvideAssemblyFilterAttribute(String)

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

NameDescription
System_CAPS_pubpropertyAssemblyFilter

Gets the full assembly specification of the filter.

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

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.

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 

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

Return to top
Show: