Partager via


RegisterExtenderAttribute Class

Note: This API is now obsolete.

Registers an extender with Visual Studio. This class cannot be inherited. This class is obsolete. Please use ProvideExtenderAttribute instead.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'Déclaration
<ObsoleteAttribute("RegisterExtenderAttribute has been deprecated. Please use ProvideExtenderAttribute instead.")> _
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := True, Inherited := True)> _
Public NotInheritable Class RegisterExtenderAttribute _
    Inherits RegistrationAttribute
'Utilisation
Dim instance As RegisterExtenderAttribute
[ObsoleteAttribute("RegisterExtenderAttribute has been deprecated. Please use ProvideExtenderAttribute instead.")]
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class RegisterExtenderAttribute : RegistrationAttribute
[ObsoleteAttribute(L"RegisterExtenderAttribute has been deprecated. Please use ProvideExtenderAttribute instead.")]
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = true, Inherited = true)]
public ref class RegisterExtenderAttribute sealed : public RegistrationAttribute
[<SealedAttribute>]
[<ObsoleteAttribute("RegisterExtenderAttribute has been deprecated. Please use ProvideExtenderAttribute instead.")>]
[<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)>]
type RegisterExtenderAttribute =  
    class
        inherit RegistrationAttribute
    end
public final class RegisterExtenderAttribute extends RegistrationAttribute

Remarks

When to Call

Implement the RegisterExtenderAttribute class when your VSPackage implements a static extender.

Basic Usage

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

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

Notes

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

Notes

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

Registry Entries

The following registry entries are created by regpkg.exe when it reads the RegisterExtenderAttribute data:

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

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

Inheritance Hierarchy

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

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

Reference

RegisterExtenderAttribute Members

Microsoft.VisualStudio.Shell Namespace

Other Resources

Registering VSPackages