CodeGeneratorRegistrationAttribute Class

Definition

Adds a custom file generator registry entry for a specific file type.

public ref class CodeGeneratorRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class CodeGeneratorRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class CodeGeneratorRegistrationAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
type CodeGeneratorRegistrationAttribute = class
    inherit RegistrationAttribute
Public NotInheritable Class CodeGeneratorRegistrationAttribute
Inherits RegistrationAttribute
Inheritance
CodeGeneratorRegistrationAttribute
Attributes

Remarks

For example:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Generators\{fae04ec1-301f-11d3-bf4b-00c04f79efbc}\MyGenerator]

"CLSID"="{AAAA53CC-3D4F-40a2-BD4D-4F3419755476}"

"GeneratesDesignTimeSource" = d'1'

Constructors

CodeGeneratorRegistrationAttribute(Type, String, String)

Initializes a new instance of the CodeGeneratorRegistrationAttribute class. Creates a new CodeGeneratorRegistrationAttribute attribute to register a custom code generator for the provided context.

Properties

ContextGuid

Gets the GUID representing the project type.

GeneratesDesignTimeSource

Gets or sets the GeneratesDesignTimeSource registry value.

GeneratesSharedDesignTimeSource

Gets or sets the GeneratesSharedDesignTimeSource registry value.

GeneratorGuid

Get the GUID representing the generator type.

GeneratorName

Gets the generator name.

GeneratorRegKeyName

Gets or sets the generator registry key name.

GeneratorType

Gets the generator type.

TypeId

Override the TypeID property in order to let the RegistrationAttribute derived classes to work with System.ComponentModel.TypeDescriptor.GetAttributes(...). An attribute derived from this one will have to override this property only if it needs a better control on the instances that can be applied to a class.

(Inherited from RegistrationAttribute)

Methods

GetPackageRegKeyPath(Guid)

Gets the registry path (relative to the registry root of the application) of the VSPackage.

(Inherited from RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Registers this attribute with the given context.

Unregister(RegistrationAttribute+RegistrationContext)

Unregisters the code generator with the given context.

Applies to