Exemple #1
0
 public Deserializer(CUS_File _cusFile, string location)
 {
     saveLocation = location;
     cusFile      = _cusFile;
     Validation();
     Write();
     File.WriteAllBytes(saveLocation, bytes.ToArray());
 }
Exemple #2
0
        public Deserializer(string location)
        {
            saveLocation = String.Format("{0}/{1}", Path.GetDirectoryName(location), Path.GetFileNameWithoutExtension(location));
            YAXSerializer serializer = new YAXSerializer(typeof(CUS_File), YAXSerializationOptions.DontSerializeNullObjects);

            cusFile = (CUS_File)serializer.DeserializeFromFile(location);
            Validation();
            Write();
            File.WriteAllBytes(saveLocation, bytes.ToArray());
        }
Exemple #3
0
 public Parser(byte[] _bytes)
 {
     rawBytes = _bytes;
     bytes    = rawBytes.ToList();
     if (bytes != null)
     {
         Parse();
     }
     else
     {
         cusFile = null;
     }
 }
Exemple #4
0
 public Deserializer(CUS_File _cusFile)
 {
     cusFile = _cusFile;
     Validation();
     Write();
 }