Compartilhar via


LanguagePreferences.InitUserPreferences Method

Gets user-modifiable settings.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'Declaração
Public Overridable Sub InitUserPreferences ( _
    key As RegistryKey, _
    name As String _
)
public virtual void InitUserPreferences(
    RegistryKey key,
    string name
)

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.

.NET Framework Security

See Also

Reference

LanguagePreferences Class

Microsoft.VisualStudio.Package Namespace