RegistrationAttribute.Key Class
Provides an abstract class that represents a registration key.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'宣言
Public MustInherit Class Key _
Implements IDisposable
'使用
Dim instance As Key
public abstract class Key : IDisposable
public ref class Key abstract : IDisposable
public abstract class Key implements IDisposable
Remarks
When to Implement
Registration tools (such as regpkg.exe) that use the information provided by the registration attribute classes must implement this class, RegistrationAttribute.Key, as well as RegistrationAttribute.RegistrationContext.
Basic Usage
A RegistrationAttribute.Key object is created by a registration utility such as regpkg.exe. The RegistrationAttribute.Key can represent an actual registry key, or it can represent information in a .reg or .vrg file.
When the registration utility registers a managed package assembly, it uses reflection to search the assembly for attribute classes that implement RegistrationAttribute.Key. The RegistrationAttribute.Key object is placed into a RegistrationAttribute.RegistrationContext object and passed to the Register method (or Unregister) method of the attribute class.
The attribute class uses the information in the RegistrationAttribute.Key and RegistrationAttribute.RegistrationContext objects to actually carry out the necessary registration tasks.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Shell.RegistrationAttribute.Key
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
Managed VSPackage Registration Keys
How to: Register Managed VSPackages
Reference
RegistrationAttribute.Key Members