ProvideCodeGeneratorAttribute 构造函数

将此特性应用于一个包的包类,该包提供了一个代码生成器。

命名空间:  Microsoft.VisualStudio.TextTemplating.VSHost
程序集:  Microsoft.VisualStudio.TextTemplating.VSHost.10.0(在 Microsoft.VisualStudio.TextTemplating.VSHost.10.0.dll 中)

语法

声明
Public Sub New ( _
    type As Type, _
    name As String, _
    description As String, _
    generatesDesignTimeSource As Boolean _
)
public ProvideCodeGeneratorAttribute(
    Type type,
    string name,
    string description,
    bool generatesDesignTimeSource
)
public:
ProvideCodeGeneratorAttribute(
    Type^ type, 
    String^ name, 
    String^ description, 
    bool generatesDesignTimeSource
)
new : 
        type:Type * 
        name:string * 
        description:string * 
        generatesDesignTimeSource:bool -> ProvideCodeGeneratorAttribute
public function ProvideCodeGeneratorAttribute(
    type : Type, 
    name : String, 
    description : String, 
    generatesDesignTimeSource : boolean
)

参数

  • type
    类型:System.Type
    实现“代码生成器”接口 IVsSingleFileGenerator 的类型
  • name
    类型:System.String
    此生成器的名称,用于其所应用的文件的自定义工具属性。
  • generatesDesignTimeSource
    类型:System.Boolean
    如为 true,则通过此自定义工具生产的文件的类型将可用于设计器

.NET Framework 安全性

请参见

参考

ProvideCodeGeneratorAttribute 类

Microsoft.VisualStudio.TextTemplating.VSHost 命名空间