IProfileManager.SaveSettingsToXml Method
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.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Syntax
'宣告
Sub SaveSettingsToXml ( _
writer As IVsSettingsWriter _
)
'用途
Dim instance As IProfileManager
Dim writer As IVsSettingsWriter
instance.SaveSettingsToXml(writer)
void SaveSettingsToXml(
IVsSettingsWriter writer
)
void SaveSettingsToXml(
IVsSettingsWriter^ writer
)
abstract SaveSettingsToXml :
writer:IVsSettingsWriter -> unit
function SaveSettingsToXml(
writer : IVsSettingsWriter
)
Parameters
- writer
Type: Microsoft.VisualStudio.Shell.Interop.IVsSettingsWriter
[in] An IVsSettingsWriter interface provided by the environment to the VSPackage providing write access to the Visual Studio settings file.
Remarks
An implementation of the SaveSettingsToXml method needs to obtain access to the VSPackage it supports so it can retrieve the current state of the VSPackage and write it to disk.
This method is called by the Visual Studio environment when a user chooses the Import/Export Settings command on the Tools menu to save the Visual Studio state.
Prior to calling this method, the IDE calls LoadSettingsFromStorage to guarantee that the VSPackage state is correct.
.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.
See Also
Reference
Microsoft.VisualStudio.Shell Namespace
Other Resources
How to: Export Settings By Using the Managed Package Framework
How to: Import Settings By Using the Managed Package Framework