ProvideCodeGeneratorExtensionAttribute Class

 

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

Namespace:   Microsoft.VisualStudio.TextTemplating.VSHost
Assembly:  Microsoft.VisualStudio.TextTemplating.VSHost.12.0 (in Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll)

System.Object
  System.Attribute
    Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.TextTemplating.VSHost.ProvideCodeGeneratorExtensionAttribute

[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, 
	Inherited = false)]
[CLSCompliantAttribute(false)]
public sealed class ProvideCodeGeneratorExtensionAttribute : RegistrationAttribute

NameDescription
System_CAPS_pubpropertyExtension

The extension to bind the named generator to

System_CAPS_pubpropertyName

The name of the generator to add an extension for

System_CAPS_pubpropertyProjectSystem

The project system that this code generator is registered with

System_CAPS_pubpropertyProjectSystemPackage

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

System_CAPS_pubpropertyTypeId

(Inherited from RegistrationAttribute.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticAspNetProjectSystemGuid

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

System_CAPS_pubfieldSystem_CAPS_staticCSharpProjectSystemGuid

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

System_CAPS_pubfieldSystem_CAPS_staticVisualBasicProjectSystemGuid

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

Should be applied to the package class, not the generator, in addition to the ProvideCodeGenerator attribute. This attribute sets up two things:

  • Default application of the specified generator to files with the extension provided

  • Correct working with the ASP.Net project system which requires file extensions to be registered

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: