次の方法で共有


RegisterAutoLoadAttribute クラス

定義

注意事項

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
属性

注釈

基本的な使用方法

RegisterAutoLoadAttribute は、VSPackage をエクステンダー (を実装するオブジェクト) として登録します IExtenderProvider。 コンストラクターに渡される GUID によって、パッケージが読み込まれるコンテキストが決まります。 を使用 RegisterAutoLoadAttributeするには、 や を実装するクラスなどの Package パッケージ クラスに配置します IVsPackage

この属性クラスは、外部登録ツールのデータを提供するためにのみ使用されます。 VSPackage のランタイム動作には影響しません。

注意

Visual C# では、任意の属性クラスの名前に "Attribute" という単語が自動的に追加されます。 Visual C# コードでは、この属性は です RegisterAutoLoad

レジストリ エントリ

によって次のレジストリ エントリが作成 RegisterAutoLoadAttributeされます。

  • <VSROOT>\AutoLoadPackages\{ContextGuid}

  • <VSROOT>\AutoLoadPackages\{ContextGuid}\{PackageGuid}=0

サンプル

クラスの実装は、 RegisterAutoLoadAttribute マネージド サンプルで確認できます。 この属性と自動登録に使用されるその他すべての属性の標準的な場所は、サンプルで使用されている言語に応じて、VsPkg.cs、VsPkg.vb、またはVsPkg.cppの クラスの実装 Package に隣接しています。

コンストラクター

RegisterAutoLoadAttribute(String)
古い.

このコンテキストがアクティブなときにパッケージを読み込む必要があることを指定します。

プロパティ

LoadGuid
古い.

パッケージの読み込みをトリガーするコンテキスト Guid。

TypeId
古い.

RegistrationAttribute 派生クラスが System.ComponentModel.TypeDescriptor.GetAttributes(...) と連携できるように、TypeID プロパティをオーバーライドします。このプロパティから派生した属性は、クラスに適用できるインスタンスをより適切に制御する必要がある場合にのみ、このプロパティをオーバーライドする必要があります。

(継承元 RegistrationAttribute)

メソッド

GetPackageRegKeyPath(Guid)
古い.

VSPackage のレジストリ パス (アプリケーションのレジストリ ルートに対する相対パス) を取得します。

(継承元 RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)
古い.

指定されたコンテキストでこの属性を登録します。 コンテキストには、登録情報の配置先の場所が含まれます。 また、登録されている型やパス情報なども含まれます。

Unregister(RegistrationAttribute+RegistrationContext)
古い.

この AutoLoad 仕様の登録を解除します。

適用対象