共用方式為


RegistrationAttribute.Key Class

Definition

Provides an abstract class that represents a registration key.

public: ref class RegistrationAttribute::Key abstract : IDisposable
public abstract class RegistrationAttribute.Key : IDisposable
type RegistrationAttribute.Key = class
    interface IDisposable
Public MustInherit Class RegistrationAttribute.Key
Implements IDisposable
Inheritance
RegistrationAttribute.Key
Derived
Implements

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.

Constructors

RegistrationAttribute.Key()

Creates a new RegistrationAttribute.Key object.

Methods

Close()

Closes a key after writing is complete.

CreateSubkey(String)

Creates a new registration key. The new key is a subkey of the current Key.

SetValue(String, Object)

Sets the name to the given value.

Explicit Interface Implementations

IDisposable.Dispose()

Disposes the object and its resources.

Applies to