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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="SectionXmlInfo.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.     using System.Configuration.Internal;
  18.     using System.Collections;
  19.     using System.Collections.Specialized;
  20.     using System.Collections.Generic;
  21.     using System.Configuration;
  22.     using System.Text;
  23.     using System.Threading;
  24.     using System.Reflection;
  25.     using System.Xml;
  26.    
  27.     internal sealed class SectionXmlInfo : IConfigErrorInfo
  28.     {
  29.         private string _configKey;
  30.         // configKey
  31.         private string _definitionConfigPath;
  32.         // the config path of the configuration record where this directive was defined
  33.         private string _targetConfigPath;
  34.         // the full config path this location directive applies to
  35.         private string _subPath;
  36.         // the "path" attribute specified in the <location> directive
  37.         private string _filename;
  38.         // filename containg this section definition
  39.         private int _lineNumber;
  40.         // line number where definition occurs
  41.         private object _streamVersion;
  42.         // version of the filestream containing this section
  43.         private string _configSource;
  44.         // the "configSource" attribute
  45.         private string _configSourceStreamName;
  46.         // filename of the configSource
  47.         private object _configSourceStreamVersion;
  48.         // version of the configSource filestream
  49.         private bool _lockChildren;
  50.         // lock child records?
  51.         private bool _skipInChildApps;
  52.         // skip inheritence by child apps?
  53.         private string _rawXml;
  54.         // raw xml input of the section
  55.         private string _protectionProviderName;
  56.         // name of the protection provider
  57.         internal SectionXmlInfo(string configKey, string definitionConfigPath, string targetConfigPath, string subPath, string filename, int lineNumber, object streamVersion, string rawXml, string configSource, string configSourceStreamName,
  58.         object configSourceStreamVersion, string protectionProviderName, bool lockChildren, bool skipInChildApps)
  59.         {
  60.            
  61.             _configKey = configKey;
  62.             _definitionConfigPath = definitionConfigPath;
  63.             _targetConfigPath = targetConfigPath;
  64.             _subPath = subPath;
  65.             _filename = filename;
  66.             _lineNumber = lineNumber;
  67.             _streamVersion = streamVersion;
  68.             _rawXml = rawXml;
  69.             _configSource = configSource;
  70.             _configSourceStreamName = configSourceStreamName;
  71.             _configSourceStreamVersion = configSourceStreamVersion;
  72.             _protectionProviderName = protectionProviderName;
  73.             _lockChildren = lockChildren;
  74.             _skipInChildApps = skipInChildApps;
  75.         }
  76.        
  77.        
  78.         // IConfigErrorInfo interface
  79.         public string Filename {
  80.             get { return _filename; }
  81.         }
  82.        
  83.         public int LineNumber {
  84.             get { return _lineNumber; }
  85.             set { _lineNumber = value; }
  86.         }
  87.        
  88.         // other access methods
  89.         internal object StreamVersion {
  90.             get { return _streamVersion; }
  91.             set { _streamVersion = value; }
  92.         }
  93.        
  94.         internal string ConfigSource {
  95.             get { return _configSource; }
  96.             set { _configSource = value; }
  97.         }
  98.        
  99.         internal string ConfigSourceStreamName {
  100.             get { return _configSourceStreamName; }
  101.             set { _configSourceStreamName = value; }
  102.         }
  103.        
  104.         internal object ConfigSourceStreamVersion {
  105.            
  106.             set { _configSourceStreamVersion = value; }
  107.         }
  108.        
  109.         internal string ConfigKey {
  110.             get { return _configKey; }
  111.         }
  112.        
  113.         internal string DefinitionConfigPath {
  114.             get { return _definitionConfigPath; }
  115.         }
  116.        
  117.         internal string TargetConfigPath {
  118.             get { return _targetConfigPath; }
  119.             set { _targetConfigPath = value; }
  120.         }
  121.        
  122.         internal string SubPath {
  123.             get { return _subPath; }
  124.         }
  125.        
  126.         internal string RawXml {
  127.             get { return _rawXml; }
  128.             set { _rawXml = value; }
  129.         }
  130.        
  131.         internal string ProtectionProviderName {
  132.             get { return _protectionProviderName; }
  133.             set { _protectionProviderName = value; }
  134.         }
  135.        
  136.         internal bool LockChildren {
  137.             get { return _lockChildren; }
  138.             set { _lockChildren = value; }
  139.         }
  140.        
  141.         internal bool SkipInChildApps {
  142.             get { return _skipInChildApps; }
  143.             set { _skipInChildApps = value; }
  144.         }
  145.     }
  146. }

Developer Fusion