Share via


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。

適用於