Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.