Esempio n. 1
0
 public static void Write(string filename, CameraPlan plan)
 {
     using (FileStream fs = new FileStream(filename, FileMode.Create))
     {
         xs.Serialize(fs, plan);
     }
 }
Esempio n. 2
0
 public static string WriteToXml(this CameraPlan plan)
 {
     using (StringWriter stream = new StringWriter())
     {
         xs.Serialize(stream, plan);
         stream.Flush();
         return(stream.ToString());
     }
 }
Esempio n. 3
0
        public static CameraPlan Parse(string filename)
        {
            CameraPlan plan = null;

            using (FileStream fs = new FileStream(filename, FileMode.Open))
            {
                plan = (CameraPlan)xs.Deserialize(fs);
            }
            return(plan);
        }
Esempio n. 4
0
 public static void Write(this CameraPlan plan, string filePath)
 {
     Write(filePath, plan);
 }
Esempio n. 5
0
 public static void Write(this CameraPlan plan, Stream stream)
 {
     xs.Serialize(stream, plan);
 }