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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="LocationUpdates.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.     //
  19.     // LocationUpdates contains all the updates that share the same location characteristics.
  20.     //
  21.     internal class LocationUpdates
  22.     {
  23.         bool _allowOverride;
  24.         bool _inheritInChildApps;
  25.         SectionUpdates _sectionUpdates;
  26.         // root of section
  27.         internal LocationUpdates(bool allowOverride, bool inheritInChildApps)
  28.         {
  29.             _allowOverride = allowOverride;
  30.             _inheritInChildApps = inheritInChildApps;
  31.             _sectionUpdates = new SectionUpdates(string.Empty);
  32.         }
  33.        
  34.         internal bool AllowOverride {
  35.             get { return _allowOverride; }
  36.         }
  37.        
  38.         internal bool InheritInChildApps {
  39.             get { return _inheritInChildApps; }
  40.         }
  41.        
  42.         internal SectionUpdates SectionUpdates {
  43.             get { return _sectionUpdates; }
  44.         }
  45.        
  46.         internal bool IsDefault {
  47.             get { return _allowOverride && _inheritInChildApps; }
  48.         }
  49.        
  50.         internal void CompleteUpdates()
  51.         {
  52.             _sectionUpdates.CompleteUpdates();
  53.         }
  54.     }
  55. }

Developer Fusion