public static void Save(string folderPath, RecoverContent item) { if (!Directory.Exists(folderPath)) { Directory.CreateDirectory(folderPath); } string path = Path.Combine(folderPath, item.Uid + ".recover"); ObjectXMLSerializer <RecoverContent> .Save(item, path, SerializedFormat.Document); }
public static void Save(ConnectionParamsCollection connParams) { foreach (ConnectionParams cp in connParams) { cp.IsEncrypted = true; cp.Password = EncryiptionHelper.Encrypt(cp.Password); } /* * string filename = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DBConnections.config"); * XmlSerializer ser = new XmlSerializer(typeof(ConnectionParamsCollection)); * TextWriter writer = new StreamWriter(filename); * ser.Serialize(writer, connParams); * writer.Close(); */ ObjectXMLSerializer <ConnectionParamsCollection> .Save(connParams, _path); // Reset password foreach (ConnectionParams cp in connParams) { cp.Password = EncryiptionHelper.Decrypt(cp.Password); } }
public static void SaveProject(Project prj) { ObjectXMLSerializer <Project> .Save(prj, prj.FullPath); }
public static void Save(List <CodeCompletionList> codeCompletionLists, string fileName) { ObjectXMLSerializer <List <CodeCompletionList> > .Save(codeCompletionLists, fileName); }
public static void SaveHistAs(SearchAndReplaceHistory hist, string fileName) { ObjectXMLSerializer <SearchAndReplaceHistory> .Save(hist, fileName); }
public static void SaveConfigurationAs(ConfigurationContent configContent, string fileName) { ObjectXMLSerializer <ConfigurationContent> .Save(configContent, fileName); }