The Labs \ Source Viewer \ SSCLI \ System.Configuration \ IApplicationSettingsProvider

  1. //------------------------------------------------------------------------------
  2. // <copyright file="IApplicationSettingsProvider.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Configuration
  16. {
  17.    
  18.     using System.Security.Permissions;
  19.    
  20.     /// <devdoc>
  21.     /// This interface is an extension to SettingsProvider that a provider can implement
  22.     /// to support additional functionality for settings classes that derive from ApplicationSettingsBase.
  23.     /// </devdoc>
  24.     public interface IApplicationSettingsProvider
  25.     {
  26.         /// <devdoc>
  27.         /// Retrieves the previous value of a given SettingsProperty. This is used in conjunction with Upgrade.
  28.         /// </devdoc>
  29.         [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
  30.         SettingsPropertyValue GetPreviousVersion(SettingsContext context, SettingsProperty property);
  31.        
  32.         /// <devdoc>
  33.         /// Resets all settings to their "default" values.
  34.         /// </devdoc>
  35.         [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
  36.         void Reset(SettingsContext context);
  37.        
  38.         /// <devdoc>
  39.         /// Indicates to the provider that the app has been upgraded. This is a chance for the provider to upgrade
  40.         /// its stored settings as appropriate.
  41.         /// </devdoc>
  42.         [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
  43.         void Upgrade(SettingsContext context, SettingsPropertyCollection properties);
  44.     }
  45. }

Developer Fusion