Пример #1
0
        public void Save()
        {
            lock (this.commandLockObject)
            {
                RuntimeData runtimeData = this.RuntimeData;

                XDocument doc = new XDocument(new XDeclaration("1.0", "UTF-8", null));

                XElement runtimeDataEl = runtimeData.GetXml();

                doc.Add(runtimeDataEl);

                string appDataFolder = this.folderService.GetAppDataFolder();

                FileSystem.CreateDirectory(appDataFolder);

                string configFile = Path.Combine(appDataFolder, RUNTIMEDATA_FILE);

                doc.Save(configFile);
            }
        }