다음을 통해 공유


RegistrationAttribute.Key Class

Provides an abstract class that represents a registration key.

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

‘선언
Public MustInherit Class Key _
    Implements IDisposable
‘사용 방법
Dim instance As RegistrationAttribute.Key
public abstract class Key : IDisposable
public ref class Key abstract : IDisposable
[<AbstractClassAttribute>]
type Key =  
    class
        interface IDisposable
    end
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

Reference

RegistrationAttribute.Key Members

Microsoft.VisualStudio.Shell Namespace

RegistrationAttribute

RegistrationAttribute.RegistrationContext

Other Resources

Managed VSPackage Registration Keys

Registering VSPackages