Innovatian.Configuration.XmlConfigurationSource.Load C# (CSharp) Method

Load() protected method

Loads the current instance from the given file.
protected Load ( string fileName ) : void
fileName string The name of the file to load into this instance.
return void
        protected override void Load( string fileName )
        {
            FileName = fileName;
            string data;
            using ( var fileStream = File.Open( FileName, FileMode.Open, FileAccess.Read, FileShare.Read ) )
            {
                using ( var textFile = new StreamReader( fileStream, DefaultEncoding ) )
                {
                    data = textFile.ReadToEnd();
                }
            }

            XDocument loaded = XDocument.Parse( data );
            Process( loaded );
        }