Condividi tramite


CodeGeneratorRegistrationAttribute Constructor

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

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Sub New ( _
    generatorType As Type, _
    generatorName As String, _
    contextGuid As String _
)
public CodeGeneratorRegistrationAttribute(
    Type generatorType,
    string generatorName,
    string contextGuid
)
public:
CodeGeneratorRegistrationAttribute(
    Type^ generatorType, 
    String^ generatorName, 
    String^ contextGuid
)
new : 
        generatorType:Type * 
        generatorName:string * 
        contextGuid:string -> CodeGeneratorRegistrationAttribute
public function CodeGeneratorRegistrationAttribute(
    generatorType : Type, 
    generatorName : String, 
    contextGuid : String
)

Parameters

  • generatorType
    Type: Type

    Type of the code generator. This parameter is a type that implements IVsSingleFileGenerator.

  • generatorName
    Type: String

    Generator name.

  • contextGuid
    Type: String

    Context GUID under which this code generator would appear.

Exceptions

Exception Condition
ArgumentNullException

The generatorType, generatorName, or contextGuid is set to null.

.NET Framework Security

See Also

Reference

CodeGeneratorRegistrationAttribute Class

Microsoft.VisualStudio.Shell Namespace