ProvideGeneratorAttribute 类

定义

在添加到 Package派生类或实现 IVsPackage的类时,为 Visual Basic 和 Visual C# 项目注册给定的代码生成器。

public ref class ProvideGeneratorAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class ProvideGeneratorAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ProvideGeneratorAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type ProvideGeneratorAttribute = class
    inherit RegistrationAttribute
Public NotInheritable Class ProvideGeneratorAttribute
Inherits RegistrationAttribute
继承
ProvideGeneratorAttribute
属性

构造函数

ProvideGeneratorAttribute(Type, String, String, String, Boolean)

为给定的 ProvideGeneratorAttribute 包和生成器初始化 的新实例。

属性

Description

获取生成器的说明。

GenerateDesignTimeSource

获取是否生成源代码以便在设计时使用。

GeneratorType

获取代码生成器的类型。

Name

获取生成器的名称。

PackageGuid

获取包含支持调用此生成器的项目的包的 GUID。

TypeId

重写 TypeID 属性,使 RegistrationAttribute 派生类能够与 System.ComponentModel.TypeDescriptor.GetAttributes 一起使用 (...) 。仅当派生自此属性的属性需要对可应用于类的实例使用更好的控件时,它才必须重写此属性。

(继承自 RegistrationAttribute)

方法

GetPackageRegKeyPath(Guid)

获取相对于 VSPackage 的应用程序) 注册表根目录 (注册表路径。

(继承自 RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

将此属性注册到给定上下文中。

Unregister(RegistrationAttribute+RegistrationContext)

当外部注册工具(如 regpkg.exe)调用时,删除有关 VSPackage 的注册信息。 有关详细信息,请参阅注册 VSPackages。

适用于