Condividi tramite


LanguagePreferences.InitUserPreferences(RegistryKey, String) Method

Definition

Gets user-modifiable settings.

public:
 virtual void InitUserPreferences(Microsoft::Win32::RegistryKey ^ key, System::String ^ name);
public:
 virtual void InitUserPreferences(Microsoft::Win32::RegistryKey ^ key, Platform::String ^ name);
 virtual void InitUserPreferences(Microsoft::Win32::RegistryKey const & key, std::wstring const & name);
public virtual void InitUserPreferences (Microsoft.Win32.RegistryKey key, string name);
abstract member InitUserPreferences : Microsoft.Win32.RegistryKey * string -> unit
override this.InitUserPreferences : Microsoft.Win32.RegistryKey * string -> unit
Public Overridable Sub InitUserPreferences (key As RegistryKey, name As String)

Parameters

key
RegistryKey

[in] A RegistryKey object representing the desired base registry subkey.

name
String

[in] The name of the registry subkey containing the user settings.

Remarks

User-modifiable settings are typically associated with a property page, and the user can alter the settings at any time. These modifications are typically made through a call to the OnUserPreferencesChanged2 method.

If your language service supports any user-modifiable settings other than the general settings, then you must derive a class from the LanguagePreferences class and override this method to initialize your language service-specific settings. Be sure to call the base method before your settings-specific tasks.

The base method ignores the parameters and calls the GetLanguagePreferences method which typically obtains the user settings from Visual Studio.

This method is typically called from the Init method.

Applies to