Share via


RegistrationAttribute.RegistrationContext Class

An abstract base class for objects providing context information from an external source to a registration attribute.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.Immutable.10.0 (in Microsoft.VisualStudio.Shell.Immutable.10.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)

Syntax

‘선언
Public MustInherit Class RegistrationContext
‘사용 방법
Dim instance As RegistrationAttribute.RegistrationContext
public abstract class RegistrationContext
public ref class RegistrationContext abstract
[<AbstractClassAttribute>]
type RegistrationContext =  class end
public abstract class RegistrationContext

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.RegistrationContext, as well as RegistrationAttribute.Key.

Basic Usage

A RegistrationAttribute.RegistrationContext object is created by a registration utility such as RegPkg.exe or the Windows Installer to provide information to a registration attribute. The registration context includes the type of object that is being registered, the object's path, and helper properties. It is also used to create keys that can be used to write registration information.

When the registration utility registers a managed package assembly, it uses reflection to search the assembly for attribute classes that implement the RegistrationAttribute class. A RegistrationAttribute.Key object is placed into the RegistrationAttribute.RegistrationContext object and passed to the Register (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 registration tasks required by the attribute.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Shell.RegistrationAttribute.RegistrationContext

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.RegistrationContext Members

Microsoft.VisualStudio.Shell Namespace

RegistrationAttribute

RegistrationAttribute.RegistrationContext

Other Resources

Managed VSPackage Registration Keys

Registering VSPackages