LanguagePreferences.InitUserPreferences Method

Gets user-modifiable settings.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'宣言
Public Overridable Sub InitUserPreferences ( _
    key As RegistryKey, _
    name As String _
)
'使用
Dim instance As LanguagePreferences
Dim key As RegistryKey
Dim name As String

instance.InitUserPreferences(key, name)
public virtual void InitUserPreferences(
    RegistryKey key,
    string name
)
public:
virtual void InitUserPreferences(
    RegistryKey^ key, 
    String^ name
)
public function InitUserPreferences(
    key : RegistryKey, 
    name : String
)

Parameters

  • name
    Type: System.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.

Permissions

See Also

Reference

LanguagePreferences Class

LanguagePreferences Members

Microsoft.VisualStudio.Package Namespace