Thinktecture.Tools.Web.Services.ContractFirst.ConfigurationManager.WriteBackConfiguration C# (CSharp) Method

WriteBackConfiguration() private method

private WriteBackConfiguration ( ) : void
return void
        private void WriteBackConfiguration()
        {
            if (this.xml == null) return;

            if (this.xmlOriginal != null)
            {
                if (this.xml.OuterXml == this.xmlOriginal.OuterXml) return;
            }

            StreamWriter streamWriter = null;
            try
            {
                streamWriter = new StreamWriter(new IsolatedStorageFileStream(this.fileName, FileMode.Create, this.isoStore));
                this.xml.Save(streamWriter);
                streamWriter.Flush();
                streamWriter.Close();

                if (this.xmlOriginal == null) this.xmlOriginal = new XmlDocument();
                this.xmlOriginal.LoadXml(this.xml.OuterXml);
            }
            catch
            {
                //throw;
            }
            finally
            {
                if (streamWriter != null)
                {
                    streamWriter.Flush();
                    streamWriter.Close();
                }
            }
        }