RegistrationAttribute.Key Class
Provides an abstract class that represents a registration key.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.Shell.RegistrationAttribute.Key
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.Immutable.10.0 (in Microsoft.VisualStudio.Shell.Immutable.10.0.dll)
Syntax
'Declaration
Public MustInherit Class Key _
Implements IDisposable
public abstract class Key : IDisposable
public ref class Key abstract : IDisposable
[<AbstractClass>]
type Key =
class
interface IDisposable
end
public abstract class Key implements IDisposable
The RegistrationAttribute.Key type exposes the following members.
Constructors
Name | Description | |
---|---|---|
RegistrationAttribute.Key | Creates a new RegistrationAttribute.Key object. |
Top
Methods
Name | Description | |
---|---|---|
Close | Closes a key after writing is complete. | |
CreateSubkey | Creates a new registration key. The new key is a subkey of the current Key. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetValue | Sets the name to the given value. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IDisposable.Dispose | Disposes the object and its resources. |
Top
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.
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
RegistrationAttribute.RegistrationContext