Share via


ProvideCodeGeneratorExtensionAttribute 類別

定義

重要

此 API 不符合 CLS 規範。

屬性類別,可針對特定擴展名提供程式代碼產生器的註冊

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

備註

應該套用至封裝類別,而不是產生器。 除了 ProvideCodeGenerator 之外,這個屬性還會使用 ProvideCodeGenerator 來設定兩個專案,) 指定產生器的預設應用程式套用至具有所提供擴展名的檔案,) 正確使用 ASP.Net 項目系統,這需要註冊擴展名

建構函式

ProvideCodeGeneratorExtensionAttribute(String, String)

建構函式

欄位

AspNetProjectSystemGuid

實際專案 GUID (,而不是封裝的 guid) ASP.Net

CSharpProjectSystemGuid

實際專案 GUID (,而不是 CSharp 的封裝 Guid)

VisualBasicProjectSystemGuid

實際專案 GUID (,而不是 Visual Basic 的封裝 Guid)

屬性

Extension

要系結具名產生器的擴充功能

Name

要為其新增擴充功能的產生器名稱

ProjectSystem

此程式代碼產生器向註冊的項目系統

ProjectSystemPackage

實作此程式代碼產生器所註冊之項目系統的套件

TypeId

覆寫 TypeID 屬性,讓 RegistrationAttribute 衍生類別搭配 System.ComponentModel.TypeDescriptor.GetAttributes (...) 。衍生自這個屬性的屬性只有在需要對可套用至類別的實例有更好的控制權時,才必須覆寫此屬性。

(繼承來源 RegistrationAttribute)

方法

GetPackageRegKeyPath(Guid)

取得相對於 VSPackage 之應用程式) 之登錄根目錄的登錄路徑 (。

(繼承來源 RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

註冊此產生器

Unregister(RegistrationAttribute+RegistrationContext)

刪除指定的金鑰

適用於