다음을 통해 공유


ProvideExtenderAttribute Class

Provides an extender for Visual Studio. This class cannot be inherited.

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

Syntax

<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := True, Inherited := True)> _
Public NotInheritable Class ProvideExtenderAttribute _
    Inherits RegistrationAttribute

Dim instance As ProvideExtenderAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class ProvideExtenderAttribute : RegistrationAttribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = true, Inherited = true)]
public ref class ProvideExtenderAttribute sealed : public RegistrationAttribute
public final class ProvideExtenderAttribute extends RegistrationAttribute

Remarks

This attribute provides an extender (an object that implements IExtenderProvider) with Visual Studio. To use ProvideExtenderAttribute, place it on a class that inherits from Package or implements IVsPackage.

This attribute class is used only to provide data for external registration tools. It does not have any effect on the runtime behavior of the VSPackage.

참고

C# automatically appends the word "Attribute" to the name of any attribute class. In C# code, refer to this attribute as ProvideExtender.

참고

The GUIDs for the Visual C# and Visual Basic project types are {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} and {F184B08F-C81C-45F6-A57F-5ABD9991F28F}, respectively.

When to Call

Apply ProvideExtenderAttribute when your VSPackage implements a static extender.

Registry Entries

The following registry entries are created by ProvideExtenderAttribute:

  • <VSROOT>\Extenders\{CATID}\EditorName\

  • <VSROOT>\Extenders\{CATID}\EditorName\@={ExtenderGuid}

Samples

You can find use of the ProvideExtenderAttribute class in the managed AutoExtender Sample. The standard location for this and all other attributes used for automatic registration is adjacent to the implementation of the package class.

Inheritance Hierarchy

System.Object
  System.Attribute
    Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.Shell.ProvideExtenderAttribute

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

How to: Register Managed VSPackages

Reference

ProvideExtenderAttribute Members

Microsoft.VisualStudio.Shell Namespace