Share via


ProvideCodeGeneratorExtensionAttribute Class

Definition

Important

This API is not CLS-compliant.

Attribute class to provide registration of a code generator against a specific file extension

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

Remarks

Should be applied to the package class, not the generator. This attribute works in addition to ProvideCodeGenerator to set up two things a) Default application of the specified generator to files with the extension provided b) Correct working with the ASP.Net project system which requires file extensions to be registered

Constructors

ProvideCodeGeneratorExtensionAttribute(String, String)

Constructor

Fields

AspNetProjectSystemGuid

Actual project GUID (as opposed to package Guid) for ASP.Net

CSharpProjectSystemGuid

Actual project GUID (as opposed to package Guid) for CSharp

VisualBasicProjectSystemGuid

Actual project GUID (as opposed to package Guid) for Visual Basic

Properties

Extension

The extension to bind the named generator to

Name

The name of the generator to add an extension for

ProjectSystem

The project system that this code generator is registered with

ProjectSystemPackage

The package implementing the project system that this code generator is registered with

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)

Register this generator

Unregister(RegistrationAttribute+RegistrationContext)

Delete our specified keys

Applies to