RegisterAutoLoadAttribute 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
RegisterAutoLoadAttribute has been deprecated. Please use ProvideAutoLoadAttribute instead.
這個屬性會將封裝註冊為擴充器。 傳入的 GUID 會決定要擴充的內容。 封裝上的屬性不會控制封裝的行為,但註冊工具可以使用它們向Visual Studio註冊適當的資訊。
public ref class RegisterAutoLoadAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class RegisterAutoLoadAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
[System.Obsolete("RegisterAutoLoadAttribute has been deprecated. Please use ProvideAutoLoadAttribute instead.")]
public sealed class RegisterAutoLoadAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
[<System.Obsolete("RegisterAutoLoadAttribute has been deprecated. Please use ProvideAutoLoadAttribute instead.")>]
type RegisterAutoLoadAttribute = class
inherit RegistrationAttribute
Public NotInheritable Class RegisterAutoLoadAttribute
Inherits RegistrationAttribute
- 繼承
- 屬性
備註
基本使用方式
RegisterAutoLoadAttribute 將 VSPackage 註冊為擴充器, (實作 IExtenderProvider的物件。 傳遞至建構函式的 GUID 會決定封裝載入的內容。 若要使用 RegisterAutoLoadAttribute,請將它放在封裝類別上,例如 Package 或實作 的 IVsPackage類別。
這個屬性類別僅用於提供外部註冊工具的數據。 它不會影響 VSPackage 的運行時間行為。
注意
Visual C# 會自動將 “Attribute” 一詞附加至任何屬性類別的名稱。 在 Visual C# 程式代碼中,此屬性為 RegisterAutoLoad
。
登錄項目
下列登錄專案是由 建立:RegisterAutoLoadAttribute
<VSROOT>\AutoLoadPackages\{ContextGuid}
<VSROOT>\AutoLoadPackages\{ContextGuid}\{PackageGuid}=0
範例
您可以在 Managed 範例中找到 類別的 RegisterAutoLoadAttribute 實作。 這個和用於自動註冊之所有其他屬性的標準位置,會與範例中使用的語言,相鄰 Package 於類別的實作VsPkg.cs、VsPkg.vb或VsPkg.cpp。
建構函式
RegisterAutoLoadAttribute(String) |
已淘汰.
指定當此內容為使用中時,應該載入套件。 |
屬性
LoadGuid |
已淘汰.
觸發封裝載入的內容 Guid。 |
TypeId |
已淘汰.
覆寫 TypeID 屬性,讓 RegistrationAttribute 衍生類別使用 System.ComponentModel.TypeDescriptor.GetAttributes (...) 。衍生自這個屬性的屬性必須覆寫此屬性,只有在實例上需要更好的控件,才能套用至類別。 (繼承來源 RegistrationAttribute) |
方法
GetPackageRegKeyPath(Guid) |
已淘汰.
取得相對於 VSPackage 應用程式) 之登錄根目錄的登錄路徑 (。 (繼承來源 RegistrationAttribute) |
Register(RegistrationAttribute+RegistrationContext) |
已淘汰.
呼叫以註冊這個具有指定內容的屬性。 內容,其中包含用來放置註冊資訊的位置。 它也包含註冊的類型,以及路徑資訊。 |
Unregister(RegistrationAttribute+RegistrationContext) |
已淘汰.
取消註冊此自動載入規格。 |