次の方法で共有


RegistrationAttribute Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

An abstract class for VSPackage registration. The RegistrationAttribute class allows new registration information to be added without changing the registration tools.

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

Syntax

'宣言
<AttributeUsageAttribute(AttributeTargets.Class)> _
Public MustInherit Class RegistrationAttribute _
    Inherits Attribute
'使用
Dim instance As RegistrationAttribute
[AttributeUsageAttribute(AttributeTargets.Class)]
public abstract class RegistrationAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class)]
public ref class RegistrationAttribute abstract : public Attribute
public abstract class RegistrationAttribute extends Attribute

Remarks

When to Implement

Derive a registration attribute from RegistrationAttribute to create a class that makes specialized registry entries when applied to your Package-derived class or a class that implements IVsPackage.

Basic Usage

Attribute classes that provide VSPackage registration information. Regpkg.exe or other registration tools must derive from and implement RegistrationAttribute. For more information, see How to: Register Managed VSPackages.

RegistrationAttribute is an abstract attribute class that enables VSPackage developers to add registration attribute classes without needing to change the registration tools.

Attribute classes that provide registration information to regpkg.exe or other registration tools must derive from RegistrationAttribute, and must implement the Register and Unregister abstract methods.

Registration tools such as regpkg.exe must implement the classes RegistrationAttribute.Key and RegistrationAttribute.RegistrationContext.

Inheritance Hierarchy

System.Object
  System.Attribute
    Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.Shell.InstalledProductRegistrationAttribute
      Microsoft.VisualStudio.Shell.ProvideAutoLoadAttribute
      Microsoft.VisualStudio.Shell.ProvideAutomationObjectAttribute
      Microsoft.VisualStudio.Shell.ProvideEditorExtensionAttribute
      Microsoft.VisualStudio.Shell.ProvideEditorFactoryAttribute
      Microsoft.VisualStudio.Shell.ProvideEditorLogicalViewAttribute
      Microsoft.VisualStudio.Shell.ProvideExtenderAttribute
      Microsoft.VisualStudio.Shell.ProvideKeyBindingTableAttribute
      Microsoft.VisualStudio.Shell.ProvideLanguageCodeExpansionAttribute
      Microsoft.VisualStudio.Shell.ProvideLanguageEditorToolsOptionCategoryAttribute
      Microsoft.VisualStudio.Shell.ProvideOptionDialogPageAttribute
      Microsoft.VisualStudio.Shell.ProvideLanguageExtensionAttribute
      Microsoft.VisualStudio.Shell.ProvideLanguageServiceAttribute
      Microsoft.VisualStudio.Shell.ProvideLoadKeyAttribute
      Microsoft.VisualStudio.Shell.ProvideMenuResourceAttribute
      Microsoft.VisualStudio.Shell.ProvideObjectAttribute
      Microsoft.VisualStudio.Shell.ProvideProfileAttribute
      Microsoft.VisualStudio.Shell.ProvideProjectFactoryAttribute
      Microsoft.VisualStudio.Shell.ProvideProjectItemAttribute
      Microsoft.VisualStudio.Shell.ProvideServiceAttribute
      Microsoft.VisualStudio.Shell.ProvideToolboxItemConfigurationAttribute
      Microsoft.VisualStudio.Shell.ProvideToolboxItemsAttribute
      Microsoft.VisualStudio.Shell.ProvideToolWindowAttribute
      Microsoft.VisualStudio.Shell.ProvideToolWindowVisibilityAttribute
      Microsoft.VisualStudio.Shell.RegisterAutoLoadAttribute
      Microsoft.VisualStudio.Shell.RegisterEditorExtensionAttribute
      Microsoft.VisualStudio.Shell.RegisterEditorLogicalViewAttribute
      Microsoft.VisualStudio.Shell.RegisterExtenderAttribute
      Microsoft.VisualStudio.Shell.RegisterLanguageExtensionAttribute
      Microsoft.VisualStudio.Shell.RegisterLoadKeyAttribute
      Microsoft.VisualStudio.Shell.RegisterProjectItemAttribute
      Microsoft.VisualStudio.Shell.PackageRegistrationAttribute

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: Create a Registration Attribute Class

Managed VSPackage Registration Keys

How to: Register Managed VSPackages

Reference

RegistrationAttribute Members

Microsoft.VisualStudio.Shell Namespace