public bool SaveToFileSync(BackupInfo backupInfo)
        {
            var doc = new XDocument();

            doc.Add(backupInfo.Serialize());
            doc.Save(Path.Combine(backupInfo.Webroot, Settings.BackupInfoFile));

            return(true);
        }
示例#2
0
        public async Task <bool> SaveToFile(BackupInfo backupInfo)
        {
            var parameters = new Dictionary <string, dynamic>
            {
                { "xml", backupInfo.Serialize().ToString() },
                { "OutputFile", $@"{backupInfo.Webroot}\{Settings.BackupInfoFile}" }
            };

            await _scriptWrapper.Run(Modules.Functions.SaveBackupInfo, parameters);

            return(true);
        }