Share via


ProvideSettingsObserverAttribute Class

Definition

Identifies a package that observes Unified Settings change events. When a package with this attribute is loaded and unified settings are available, the package's implementation of CreateSettingsObserverAsync(Guid) will be called for the observer type.

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public class ProvideSettingsObserverAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type ProvideSettingsObserverAttribute = class
    inherit RegistrationAttribute
Public Class ProvideSettingsObserverAttribute
Inherits RegistrationAttribute
Inheritance
ProvideSettingsObserverAttribute
Attributes

Constructors

ProvideSettingsObserverAttribute(Type)

Initializes a new instance of the ProvideSettingsObserverAttribute class.

Fields

ForceLoadValueName
PackageValueName
SettingsObserversRootKeyName

Properties

ForceLoad

If true, the package will be loaded and the observer created as soon as unified settings are available. If false, the observer will be created whenever conditions in the system otherwise demand the package to be loaded.

The default value is false.

ObserverType

The type of the settings observer, which must implement ISettingsObserver.

TypeId

Override the TypeID property in order to let the RegistrationAttribute derived classes to work with System.ComponentModel.TypeDescriptor.GetAttributes(...). An attribute derived from this one will have to override this property only if it needs a better control on the instances that can be applied to a class.

(Inherited from RegistrationAttribute)

Methods

GetPackageRegKeyPath(Guid)

Gets the registry path (relative to the registry root of the application) of the VSPackage.

(Inherited from RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Registers this VSPackage with a given context, when called by an external registration tool such as regpkg.exe. For more information, see Registering VSPackages.

Unregister(RegistrationAttribute+RegistrationContext)

Called to unregister this attribute with the given context.

Applies to