Partager via


LanguagePreferences.InitUserPreferences Method

Gets user-modifiable settings.

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

Syntax

'Declaration
Public Overridable Sub InitUserPreferences ( _
    key As RegistryKey, _
    name As String _
)
public virtual void InitUserPreferences(
    RegistryKey key,
    string name
)
public:
virtual void InitUserPreferences(
    RegistryKey^ key, 
    String^ name
)
abstract InitUserPreferences : 
        key:RegistryKey * 
        name:string -> unit  
override InitUserPreferences : 
        key:RegistryKey * 
        name:string -> unit
public function InitUserPreferences(
    key : RegistryKey, 
    name : String
)

Parameters

  • key
    Type: RegistryKey

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

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