Interface implemented by classes supporting VSPackages by persisting their state information through the Visual Studio settings mechanism.
This API is not CLS-compliant.
Assembly: Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
'Declaration <CLSCompliantAttribute(False)> _ Public Interface IProfileManager
[CLSCompliantAttribute(false)] public interface IProfileManager
[CLSCompliantAttribute(false)] public interface class IProfileManager
[<CLSCompliantAttribute(false)>] type IProfileManager = interface end
public interface IProfileManager
The IProfileManager type exposes the following members.
|LoadSettingsFromStorage||Reads a VSPackage's configuration from local storage (typically the registry) and updates its state.|
|LoadSettingsFromXml||Writes a VSPackage's configuration to disk using the Visual Studio settings mechanism when the export option of an Import/Export Settings feature available on the IDE’s Tools menu is selected by a user.|
|ResetSettings||Resets the user settings.|
|SaveSettingsToStorage||Writes a VSPackage's configuration to local storage (typically the registry) following state update.|
|SaveSettingsToXml||Writes a VSPackage's configuration to disk using the Visual Studio settings mechanism when an import option of the Import/Export Settings command on the IDE’s Tools menu is selected by a user.|
Providing Visual Studio settings support for a VSPackage should be done by implementing IProfileManager on a class independent of the class implementing the VSPackage itself.
This is because a class providing IProfileManager support will be instantiated when a user chooses the Import/Export Settings command on the Tools menu to save or retrieve Visual Studio state.
The Component base class does this for the derived class and it is the easiest way to fulfill the requirement.
The object implementing IProfileManager is registered as supporting a given VSPackage by applying a ProvideProfileAttribute to the package implementation. For more information, see Persisting Settings and ProvideProfileAttribute.
For more information, see How to: Import Settings By Using the Managed Package Framework and How to: Export Settings By Using the Managed Package Framework.
The Visual Studio also calls LoadSettingsFromStorage when it starts up a VSPackage to properly initialize its state.
Notes to Implementers
Implement this interface on a class when a VSPackage needs to save or retrieve settings from disk via the Visual Studio settings mechanism, as well as keeping its state synchronized with local storage (such as the registry).
Classed implementing IProfileManager, must also implement IComponent.