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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ConfigXmlCDataSection.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.IO;
  19.     using System.Xml;
  20.     using System.Security.Permissions;
  21.    
  22.     internal sealed class ConfigXmlCDataSection : XmlCDataSection, IConfigErrorInfo
  23.     {
  24.         int _line;
  25.         string _filename;
  26.        
  27.         public ConfigXmlCDataSection(string filename, int line, string data, XmlDocument doc) : base(data, doc)
  28.         {
  29.             _line = line;
  30.             _filename = filename;
  31.         }
  32.         int IConfigErrorInfo.LineNumber {
  33.             get { return _line; }
  34.         }
  35.         string IConfigErrorInfo.Filename {
  36.             get { return _filename; }
  37.         }
  38.         public override XmlNode CloneNode(bool deep)
  39.         {
  40.             XmlNode cloneNode = base.CloneNode(deep);
  41.             ConfigXmlCDataSection clone = cloneNode as ConfigXmlCDataSection;
  42.             if (clone != null) {
  43.                 clone._line = _line;
  44.                 clone._filename = _filename;
  45.             }
  46.             return cloneNode;
  47.         }
  48.     }
  49. }

Developer Fusion