System
2.0.0.0
4.0.0.0
The application settings architecture enables you to provide a custom storage mechanism for application settings by creating a custom settings provider, which is a class derived from . Such a class contains the basic functionality for storing and retrieving properties. However, you can add additional standardized functionality by implementing the interface in the custom settings provider. This interface contains three methods that primarily enable the settings provider to more intelligently handle application version changes. Typically, the settings provider will store application settings for different versions of an application separately to anticipate the following circumstances:
-
Side-by-side execution of different versions of an application.
-
Retaining application settings when upgrading an application.
-
Resetting the application settings to their default values for the currently used version.
The class implements the interface. The same set of methods contained by is also found in the class, enabling the establishment of a predefined communication channel between an application settings wrapper and its settings provider.
This interface is optional. If a provider does not implement this interface, the settings infrastructure will fail without notification if it attempts to access any of the methods defined by this interface.
Defines extended capabilities for client-based application settings providers.
Method
2.0.0.0
4.0.0.0
System.Configuration.SettingsPropertyValue
You can use the method in conjunction with the method to migrate application settings during or after the installation of a new version of an application.
Returns the value of the specified settings property for the previous version of the same application.
A containing the value of the specified property setting as it was last set in the previous version of the application; or null if the setting cannot be found.
A describing the current application usage.
The whose value is to be returned.
Method
2.0.0.0
4.0.0.0
System.Void
The method reinitializes the stored values of the specified application settings group. In contrast, supplies a default value for a single settings property during property initialization, if it has no stored value.
The settings provider determines what reasonable defaults are for the specified group of application settings. For example, the implementation in resets user-scoped settings to their shared values in the application.exe.config file; in contrast, it leaves the application-scoped settings unchanged.
Resets the application settings associated with the specified application to their default values.
A describing the current application usage.
Method
2.0.0.0
4.0.0.0
System.Void
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 method, implemented in a class derived from .
You can use the method in conjunction with the 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 is applied to it, or to the entire settings wrapper class, derived from .
Indicates to the provider that the application has been upgraded. This offers the provider an opportunity to upgrade its stored settings as appropriate.
A describing the current application usage.
A containing the settings property group whose values are to be retrieved.