Example #1
0
        private static XDocument CreateDocument(XName rootName, string fullPath)
        {
            var document = new XDocument(new XElement(rootName));

            // Add it to the file system
            FileSystemUtility.AddFile(fullPath, document.Save);
            return(document);
        }
Example #2
0
        /// <summary>
        /// Flushes any in-memory updates in the SettingsFile to disk.
        /// </summary>
        internal void SaveToDisk()
        {
            if (IsDirty)
            {
                ExecuteSynchronized(() =>
                {
                    FileSystemUtility.AddFile(ConfigFilePath, _xDocument.Save);
                });

                IsDirty = false;
            }
        }
Example #3
0
 private void Save()
 {
     ExecuteSynchronized(() => FileSystemUtility.AddFile(ConfigFilePath, ConfigXDocument.Save));
 }
Example #4
0
 private static XDocument CreateDocument(XDocument content, string fullPath)
 {
     // Add it to the file system
     FileSystemUtility.AddFile(fullPath, content.Save);
     return(content);
 }