Beispiel #1
0
 public static void XmlConvert(string path)
 {
     using (var file = new FileStream(path, FileMode.Open))
     {
         Console.Write("Beginning XML Deserialization\n");
         var dsc = new DSC();
         dsc.XmlDeserialize(file);
         Console.Clear();
         Console.WriteLine($"DSC has {dsc.File.Functions.Count} functions.");
         Console.Write("XML Deserialization Successful\n");
         var savePath = Path.ChangeExtension(path, "dsc");
         using (var save = new FileStream(savePath, FileMode.Create))
         {
             Console.Write("Beginning DSC Serialization\n");
             dsc.File.BinSerialize(save);
             Console.Write("DSC Serialization Successful\n");
         }
     }
 }
Beispiel #2
0
 public static void DscConvert(string path)
 {
     using (var file = new FileStream(path, FileMode.Open))
     {
         Console.Write("Beginning DSC Deserialization\n");
         var dsc = DSC.Deserialize(file);
         Console.Clear();
         Console.WriteLine($"DSC has {dsc.File.Functions.Count} functions.");
         Console.Write("DSC Deserialization Successful\n");
         Console.Write($"DSC Type {dsc.File.GetType()}\n");
         var savePath = Path.ChangeExtension(path, "xml");
         using (var save = new FileStream(savePath, FileMode.Create))
         {
             Console.Write("Beginning XML Serialization\n");
             dsc.File.XmlSerialize(save);
             Console.Write("XML Serialization Successful\n");
         }
     }
 }