ConfigXmlCDataSection.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigXmlCDataSection.cs / 1305376 / ConfigXmlCDataSection.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Configuration 
{ 
    using System.Configuration.Internal;
    using System.IO; 
    using System.Xml;
    using System.Security.Permissions;

    internal sealed class ConfigXmlCDataSection : XmlCDataSection, IConfigErrorInfo { 
        int _line;
        string _filename; 
 
        public ConfigXmlCDataSection( string filename, int line, string data, XmlDocument doc )
            : base( data, doc) { 
            _line = line;
            _filename = filename;
        }
        int IConfigErrorInfo.LineNumber { 
            get { return _line; }
        } 
        string IConfigErrorInfo.Filename { 
            get { return _filename; }
        } 
        public override XmlNode CloneNode(bool deep) {
            XmlNode cloneNode = base.CloneNode(deep);
            ConfigXmlCDataSection clone = cloneNode as ConfigXmlCDataSection;
            if (clone != null) { 
                clone._line = _line;
                clone._filename = _filename; 
            } 
            return cloneNode;
        } 
    }
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Configuration 
{ 
    using System.Configuration.Internal;
    using System.IO; 
    using System.Xml;
    using System.Security.Permissions;

    internal sealed class ConfigXmlCDataSection : XmlCDataSection, IConfigErrorInfo { 
        int _line;
        string _filename; 
 
        public ConfigXmlCDataSection( string filename, int line, string data, XmlDocument doc )
            : base( data, doc) { 
            _line = line;
            _filename = filename;
        }
        int IConfigErrorInfo.LineNumber { 
            get { return _line; }
        } 
        string IConfigErrorInfo.Filename { 
            get { return _filename; }
        } 
        public override XmlNode CloneNode(bool deep) {
            XmlNode cloneNode = base.CloneNode(deep);
            ConfigXmlCDataSection clone = cloneNode as ConfigXmlCDataSection;
            if (clone != null) { 
                clone._line = _line;
                clone._filename = _filename; 
            } 
            return cloneNode;
        } 
    }
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK