.NET Framework Class Library
IApplicationSettingsProvider..::.Upgrade Method

Indicates to the provider that the application has been upgraded. This offers the provider an opportunity to upgrade its stored settings as appropriate.

Namespace:  System.Configuration
Assembly:  System (in System.dll)
Syntax

Visual Basic (Declaration)
<PermissionSetAttribute(SecurityAction.LinkDemand, Name := "FullTrust")> _
Sub Upgrade ( _
    context As SettingsContext, _
    properties As SettingsPropertyCollection _
)
Visual Basic (Usage)
Dim instance As IApplicationSettingsProvider
Dim context As SettingsContext
Dim properties As SettingsPropertyCollection

instance.Upgrade(context, properties)
C#
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
void Upgrade(
    SettingsContext context,
    SettingsPropertyCollection properties
)
Visual C++
[PermissionSetAttribute(SecurityAction::LinkDemand, Name = L"FullTrust")]
void Upgrade(
    SettingsContext^ context, 
    SettingsPropertyCollection^ properties
)
JScript
function Upgrade(
    context : SettingsContext, 
    properties : SettingsPropertyCollection
)

Parameters

context
Type: System.Configuration..::.SettingsContext
A SettingsContext describing the current application usage.
properties
Type: System.Configuration..::.SettingsPropertyCollection
A SettingsPropertyCollection containing the settings property group whose values are to be retrieved.
Remarks

The .NET Framework enables side-by-side installation and execution of different versions of the same application. The application settings provider stores the application settings for each version of an application separately to ensure isolation. However, you may want to migrate settings from the previous version of an application to the current one. To provide this migration functionality, use the Upgrade method, implemented in a class derived from SettingsProvider.

You can use the Upgrade method in conjunction with the GetPreviousVersion method to migrate application settings during or after the installation of a new version of an application.

This method should be suppressed for every application setting that has the NoSettingsVersionUpgradeAttribute is applied to it, or to the entire settings wrapper class, derived from ApplicationSettingsBase.

.NET Framework Security

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0
See Also

Reference

Other Resources

Tags :


Page view tracker