다음을 통해 공유


RegisterAutoLoadAttribute 클래스

정의

주의

RegisterAutoLoadAttribute has been deprecated. Please use ProvideAutoLoadAttribute instead.

이 특성은 패키지를 extender로 등록합니다. 전달된 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를 extender(를 구현하는 개체)로 등록합니다 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 사양을 등록 취소합니다.

적용 대상