Ejemplo n.º 1
0
        public void serialize(Project <T> project, string filePath)
        {
            var wrapper = new ProjectWrapper <T>(project);
            var json    = JsonConvert.SerializeObject(wrapper);

            File.WriteAllText(filePath, json);
        }
Ejemplo n.º 2
0
        public void serialize(Project <T> project, string filePath)
        {
            var fileStream = new FileStream(filePath, FileMode.Create);
            var wrapper    = new ProjectWrapper <T>(project);

            formatter.Serialize(fileStream, wrapper);
            fileStream.Close();
        }