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
Assemblies: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell.Immutable.10.0 (in Microsoft.VisualStudio.Shell.Immutable.10.0.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
[<AbstractClassAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Class)>]
type RegistrationAttribute =
class
inherit Attribute
end
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 Registering 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.PackageRegistrationAttribute
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.ProvideLanguageExtensionAttribute
Microsoft.VisualStudio.Shell.ProvideLanguageServiceAttribute
Microsoft.VisualStudio.Shell.ProvideLoadKeyAttribute
Microsoft.VisualStudio.Shell.ProvideMenuResourceAttribute
Microsoft.VisualStudio.Shell.ProvideObjectAttribute
Microsoft.VisualStudio.Shell.ProvideOptionDialogPageAttribute
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
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
Microsoft.VisualStudio.Shell Namespace