Esempio n. 1
0
        public static void SaveXml <T>(T value, string path) where T : class
        {
            var    serializer = new ConfigurationSerializer <T>();
            string result     = serializer.Serialize(value);

            // path = GetPathToFile(path);
            WriteText(result, path);
        }
Esempio n. 2
0
        public static T OpenXml <T>(string path) where T : class
        {
            string builder = OpenFileOneLine(path);

            var serializer = new ConfigurationSerializer <T>();

            return(serializer.Deserialize(builder));
        }