示例#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);
        }
        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();
        }