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.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.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: Microsoft.Win32.RegistryKey
[in] A RegistryKey object representing the desired base registry subkey.
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.