Export (0) Print
Expand All

IApplicationSettingsProvider Interface

Defines extended capabilities for client-based application settings providers.

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

public interface IApplicationSettingsProvider

The IApplicationSettingsProvider type exposes the following members.

  NameDescription
Public methodGetPreviousVersionReturns the value of the specified settings property for the previous version of the same application.
Public methodResetResets the application settings associated with the specified application to their default values.
Public methodUpgradeIndicates to the provider that the application has been upgraded. This offers the provider an opportunity to upgrade its stored settings as appropriate.
Top

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 SettingsProvider. Such a class contains the basic functionality for storing and retrieving properties. However, you can add additional standardized functionality by implementing the IApplicationSettingsProvider 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 LocalFileSettingsProvider class implements the IApplicationSettingsProvider interface. The same set of methods contained by IApplicationSettingsProvider is also found in the ApplicationSettingsBase class, enabling the establishment of a predefined communication channel between an application settings wrapper and its settings provider.

NoteNote

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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft