DialogPage.SaveSettingsToStorage Method
Called by Visual Studio to store a dialog page's settings in local storage, generally the registry.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
Public Overridable Sub SaveSettingsToStorage
Dim instance As DialogPage
instance.SaveSettingsToStorage()
public virtual void SaveSettingsToStorage()
public:
virtual void SaveSettingsToStorage()
public function SaveSettingsToStorage()
Implements
IProfileManager.SaveSettingsToStorage()
Remarks
SaveSettingsToStorage implements IProfileManager.SaveSettingsToStorage.
This method is called to save a dialog page's settings to local (as opposed to disk) storage, typically from the registry.
The default implementation:
Saves setting information for all the properties of the dialog page's automation object that support conversion to a string through TypeConverter.
Stores settings in registry under the registry <VSROOT>\<SettingsRegistryPath>, where
<VSROOT> is the top Visual Studio version specific top level registry entry, typically
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\<Version>.
<Version> is the Visual Studio version.
An alternate root can be specified when the Visual Studio shell is initialized. For more information on specifying an alternate root in the registry, see, Command-Line Switches (Visual Studio SDK).
<SettingsRegistryPath> is the value returned by SettingsRegistryPath.
Nota
Typically an instance of a dialog page class is its own automation object. Therefore, properties stored are those of the DialogPage base class. However, if AutomationObject returns another object, it is that object's properties, and not the properties of the class, that are stored.
When a dialog page's public properties are modified through its dialog window, SaveSettingsToStorage is automatically called to save the state to local storage (the registry by default).
Permissions
- 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.
See Also
Concepts
State Persistence and the Visual Studio IDE