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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ExeConfigurationFileMap.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. using System;
  16. using System.Collections;
  17. using System.Collections.Specialized;
  18. using System.Security;
  19. using System.Security.Permissions;
  20. namespace System.Configuration
  21. {
  22.    
  23.     //
  24.     // Holds the configuration file mapping for an Exe.
  25.     //
  26.     public sealed class ExeConfigurationFileMap : ConfigurationFileMap
  27.     {
  28.         string _exeConfigFilename;
  29.         string _roamingUserConfigFilename;
  30.         string _localUserConfigFilename;
  31.        
  32.         public ExeConfigurationFileMap()
  33.         {
  34.             _exeConfigFilename = String.Empty;
  35.             _roamingUserConfigFilename = String.Empty;
  36.             _localUserConfigFilename = String.Empty;
  37.         }
  38.        
  39.         ExeConfigurationFileMap(string machineConfigFilename, string exeConfigFilename, string roamingUserConfigFilename, string localUserConfigFilename) : base(machineConfigFilename)
  40.         {
  41.            
  42.             _exeConfigFilename = exeConfigFilename;
  43.             _roamingUserConfigFilename = roamingUserConfigFilename;
  44.             _localUserConfigFilename = localUserConfigFilename;
  45.         }
  46.        
  47.         public override object Clone()
  48.         {
  49.             return new ExeConfigurationFileMap(MachineConfigFilename, _exeConfigFilename, _roamingUserConfigFilename, _localUserConfigFilename);
  50.         }
  51.        
  52.         //
  53.         // The name of the config file for the exe.
  54.         //
  55.         public string ExeConfigFilename {
  56.             get { return _exeConfigFilename; }
  57.            
  58.             set { _exeConfigFilename = value; }
  59.         }
  60.        
  61.         //
  62.         // The name of the config file for the roaming user.
  63.         //
  64.         public string RoamingUserConfigFilename {
  65.             get { return _roamingUserConfigFilename; }
  66.            
  67.             set { _roamingUserConfigFilename = value; }
  68.         }
  69.        
  70.         //
  71.         // The name of the config file for the local user.
  72.         //
  73.         public string LocalUserConfigFilename {
  74.             get { return _localUserConfigFilename; }
  75.            
  76.             set { _localUserConfigFilename = value; }
  77.         }
  78.     }
  79. }

Developer Fusion